IntroductionWelcome| 00:00 | Hello and welcome to Drupal Essential
Training. I'm Tom Geller and I will be
| | 00:05 | leading you through Drupal, one of the fastest
growing content management systems on the web.
| | 00:10 | I started using Drupal because I
wanted to create promotional websites for my
| | 00:13 | work that were bulletproof and easy to maintain.
| | 00:16 | One such site is savemyhomebook.com,
built entirely in Drupal. This course is
| | 00:22 | designed for people who have a basic
understanding of how the web works.
| | 00:25 | No other knowledge is needed, and although
you may find some chapters difficult at first,
| | 00:30 | don't worry. I'll explain everything as we go.
| | 00:33 | If you have created web pages in
HTML, programed in PHP or managed SQL
| | 00:38 | databases you are well ahead of the game.
| | 00:41 | By the end of this course you will have all the skills
you need to make a fully featured attractive website.
| | 00:47 | Let's get started!
| | Collapse this transcript |
| Using the example files| 00:00 | At certain points in this course, you will
be working on a site that's already
| | 00:03 | been built or importing text or
graphics into your own site. If you're a
| | 00:07 | premium member of lynda.com Online
Training Library or if you are watching this
| | 00:11 | tutorial on a DVD-ROM, you have access to
the exercise files used throughout this title.
| | 00:17 | However, there are no exercise files
until late in Chapter 3 at which time you
| | 00:22 | will have already installed MAMP or WAMP
and the Drupal package itself.
| | 00:26 | Most videos have only one exercise file,
a text file that contains the MySQL database.
| | 00:33 | You install this file into your Drupal site
using the utility phpMyAdmin, which
| | 00:37 | is installed as part of the MAMP package
for MAC or WAMP for Windows.
| | 00:42 | For details on that process watch the videos
Installing MAMP or Installing WAMP.
| | 00:48 | If you can't install the phpMyAdmin program
or choose not to, you will have to
| | 00:53 | populate the database using another method,
such as other MySQL utilities or
| | 00:58 | MySQL's command-line interface. But
we'll show you how to do it using phpMyAdmin.
| | 01:03 | To open phpMyAdmin, open MAMP or WAMP whichever
you have installed on your computer.
| | 01:10 | From there click on Open start page and
then the phpMyAdmin link. If you have
| | 01:17 | already installed an exercise file or if
you started building a Drupal site you
| | 01:21 | will have to drop your existing database.
To do so, go over to the database
| | 01:25 | pop-up menu, select Drupal and then click
on Drop. It will give you a warning
| | 01:31 | that you are going to destroy the entire
database. Make sure that you want to
| | 01:35 | do this and backup that database if you
have any information in it that you'd
| | 01:38 | like to keep. But we don't, so we will click
on OK. The database has now been dropped.
| | 01:44 | Now we are going to import the exercise
file. To do so, scroll down to the
| | 01:49 | bottom of the screen where you have this
choice Import. Click on it, and then
| | 01:53 | go up to Choose File and click on that
button. From there navigate to the
| | 01:58 | exercise file you'd like to use. We are
going to go to Chapter 10, the first
| | 02:03 | video and import that database. We click
on the File and click on Choose;
| | 02:09 | scroll to the bottom of the
screen and click on Go.
| | 02:14 | If the database import has been successful
you will see a message up here that
| | 02:17 | says so. If not, you will see a message that
says that. The most common problem
| | 02:21 | is for getting to drop the previous database.
| | 02:24 | Now let's go back to our site and see what
it looks like. We reload the page
| | 02:31 | and we can see that our importation of the
exercise file has been successful.
| | 02:35 | Occasionally a video will have other types
of exercise files. Graphics files
| | 02:40 | are included whenever we add them to our
sample site in the video. Of course,
| | 02:43 | you are welcome to use your own. Although,
I recommend you make them of the
| | 02:46 | same size and file type as those provided.
Text files are included whenever we
| | 02:50 | create content on the site, so you don't
have to do much typing. In either
| | 02:55 | case, we will show you what to do with
them during the course of the video.
| | 02:59 | Once again before you use an exercise
file keep in mind that dropping the
| | 03:03 | database deletes nearly all the content on
your Drupal site, including articles
| | 03:07 | you have written, blocks you have laid
out and modifications to the sites designed.
| | 03:12 | If you have created anything that you
want to keep be sure to backup the
| | 03:15 | database first. We will show you how to
do so in the video backing-up your
| | 03:19 | Drupal site.
| | 03:20 | If you are a Monthly Subscriber or Annual
Subscriber to lynda.com, you don't
| | 03:25 | have access to the exercise files, but
you can follow along from scratch or
| | 03:29 | with your own assets.
| | 03:31 | Now that you can find and load the example
files you will move through the
| | 03:34 | course more quickly and completely. Refer
back to this video, if you have any
| | 03:37 | problems and just to reiterate watch the
session about backing up a site and
| | 03:41 | restoring it from backup once you start building
a site whose loss would cause you problems.
| | Collapse this transcript |
|
|
1. What Is Drupal?Drupal is a CMS| 00:00 | What is Drupal? Technically, Drupal
is a Content Management System or CMS.
| | 00:05 | CMSs are designed to give non-technical
people such as writers, editors and
| | 00:10 | publishers extensive control over what
appears in their publications without
| | 00:14 | having to understand the mechanics of
production. So we know the Drupal is a
| | 00:18 | CMS, but what exactly is that?
| | 00:21 | As we said, it's a Content Management
System, but when we say CMS we really
| | 00:25 | mean Web Content Management System. You
may see WCMS at some places outside of
| | 00:31 | the Drupal community. When we
say CMS, we really mean WCMS.
| | 00:36 | So what is a CMS? Technically speaking
it's a server-based set of programs;
| | 00:41 | in the case of Drupal it's a PHP set of
programs. It delivers information via a
| | 00:46 | web browser so that anybody can look
at it who has Firefox or Opera or any
| | 00:51 | other web browser.
| | 00:52 | Third of all, a CMS lets you concentrate
on content. You don't have to worry
| | 00:57 | about managing the server, changing
permissions, generally speaking. People who
| | 01:02 | don't know those things can just worry
about the words and pictures and what
| | 01:05 | goes on the website.
| | 01:07 | There are certain characteristics that
are shared by many CMSs. Whether it's
| | 01:11 | Joomla, Drupal or any other CMS. One
of them is that you can add, change or
| | 01:16 | delete content via a web interface. You
don't have to put files on and off the server.
| | 01:21 | A second characteristic is that a CMS
will automatically link content together
| | 01:26 | so that if, for example, you set up a
menu system that appears in the left
| | 01:30 | column and then move it to the right
column, it stays the same and all of the
| | 01:33 | links stay the same; you don't have
to worry about relinking everything.
| | 01:37 | A third characteristic is that a CMS
enforces site wide consistency, if that's
| | 01:41 | what you want. So that every page has
the same navigation system, it has the
| | 01:44 | same basic feel and your entire site
has a sense of consistency that might be
| | 01:49 | missing if you try to build the site by scratch.
| | 01:52 | A fourth characteristic is that a
CMS allows multiple users to affect the
| | 01:56 | site's content. You don't have to
have a single web master who knows how
| | 01:59 | everything works. You can set up
different levels of permission so that one
| | 02:03 | person for example writes the stories,
another person or group of people can
| | 02:07 | edit the stories and so forth. You have
many people doing many different things
| | 02:11 | and permissions allow them to
do only those things they should.
| | 02:15 | Finally, a CMS has extended content
features that are easy implement. For
| | 02:19 | example, as we'll see with Drupal,
you can set up polls where you ask a
| | 02:23 | question of your entire membership and
get the results back in an easy way or
| | 02:26 | you can set up forums for them to talk
to each other and so forth. There are
| | 02:30 | many different features that you can
build into Drupal without having to do
| | 02:33 | additional programming.
| | 02:35 | But most importantly, CMSs let you
separate content from presentation and
| | 02:40 | I'll show you exactly what I mean by
that by showing you a site that shows many
| | 02:44 | different types of Drupal
themes called themegarden.org.
| | 02:48 | This is themegarden.org. At the top
you have the name of the site, you have
| | 02:52 | menus, Drupal 4.7 themes, Drupal 5
themes and so forth. You have columns here
| | 02:57 | with additional navigation, and then in
the middle you have what's really your
| | 03:00 | main content. This article is written
by somebody who probably was not the Site
| | 03:04 | Administrator per se, but was
just somebody who does the writing.
| | 03:09 | Now let's go to another theme, this one
called Glossy Blue and what you notice
| | 03:14 | is it looks completely different but
the content is basically the same. You
| | 03:17 | have the same menus, you have the same
content here, the article didn't change
| | 03:22 | and the same basic navigational system.
This one is interesting because it
| | 03:26 | knocked out the left-hand column but actually
the navigation system is the same in the right.
| | 03:30 | Let's go to another one and there is the left-
hand column, the right-hand column, the same content.
| | 03:36 | So you can see that CMSs are good for
many things, but they are not for every website.
| | 03:40 | For example, a website that only has
a few pages or a website in which
| | 03:44 | there are many different pages would
not really be appropriate for Drupal or
| | 03:47 | really any other CMS. CMSs are
best for websites that have multiple
| | 03:51 | contributors, that require a
consistent look and feel and that have advanced
| | 03:55 | functions without lots of custom
programming. In other words, you don't have to
| | 03:59 | program in those polls and forums and
other functions that you want on your website.
| | 04:03 | You are probably already familiar with
certain CMSs. Some of the more popular
| | 04:08 | ones are WordPress, Joomla and
MediaWiki, and we're going to show you a few
| | 04:13 | examples of each of those and you can
see what some of the similarities are
| | 04:16 | amongst CMSs.
| | 04:18 | This page is this Yahoo! blog called
the Yodel Anecdotal and it's actually
| | 04:22 | built on WordPress. You can see that
it looks like many blogs that you have
| | 04:26 | seen before. It has articles, which
are arranged in reverse chronological order,
| | 04:30 | it has a number of links on the side,
it has this photo pool here and it
| | 04:35 | also shows what the most recent
posts are. So it does have quite a few
| | 04:38 | functions and it's built on WordPress.
| | 04:42 | This site, SeniorNet, is built on Joomla,
which is very similar to Drupal.
| | 04:46 | As with Drupal, it has menus at the top,
it has a menuing system along the side,
| | 04:50 | and once again, it has its content in
the center here. It also has space for
| | 04:54 | ads over here and it has a neat little
feature which allows people to make the
| | 04:59 | text size larger with just a click
of a button or again make it smaller.
| | 05:05 | A third type of CMS with which you are
probably familiar is Wikimedia on which
| | 05:09 | Wikipedia, the encyclopedia, is built.
| | 05:12 | Wikipedia is one of the most popular
sites on the Internet and it allows
| | 05:16 | thousands and thousands of people to
contribute to it. Here we have an article
| | 05:20 | in the center- again which was done not
by an Administrator but by a Writer- and
| | 05:24 | along the side we have all of these
useful links that stay the same from
| | 05:28 | page-to-page and for each individual
article we have these tabs, which again
| | 05:32 | are consistent from page-to-page.
| | 05:35 | Besides the three content management
systems we just looked at there are many,
| | 05:38 | many, many more, and if you go to Wikipedia's
page, 'List of content management systems,'
| | 05:43 | you can see a list of them.
| | 05:45 | Starting from the top, each one of
these rows is a different CMS. You can see
| | 05:49 | just in free and open source software
there are dozens and dozens of CMSs.
| | 05:55 | Finally there are CMSs which are not
available for you to use directly, that is,
| | 06:00 | you can't download them and put
them on your server. One example is
| | 06:04 | Facebook.
| | 06:06 | So now you have seen some CMSs other
than Drupal, but what about Drupal itself?
| | 06:10 | As it happens it's widely used on the
web as well. One of the largest sites
| | 06:14 | that uses Drupal is The Onion, a
satirical newspaper, and as you can see it has
| | 06:19 | three columns, it has individual
articles, once again which are written by
| | 06:23 | writers, not by site administrators,
so it has multiple contributors
| | 06:27 | contributing to the site. It has a
menuing system up here and it has a few neat
| | 06:32 | little features like down here as you
mouse over one of these pictures it shows
| | 06:36 | the related story. There is also space
for advertising, space for rich media
| | 06:42 | and so forth.
| | 06:44 | Another site that's built on Drupal,
the main page for Spread Firefox which if
| | 06:49 | you downloaded the Firefox Web
Browser you may have seen. This is a good
| | 06:52 | example of a Drupal page because it's
visually so different from most of the
| | 06:56 | Drupal pages you have seen. It
doesn't have any left or right columns or at
| | 07:00 | least not such as we know them.
It's very graphical, it has these nice
| | 07:04 | gradients in here, even though this
is plane text, it's on top of this nice
| | 07:08 | gradient.
| | 07:10 | A third website that's built on Drupal
is this Yahoo! Research page. This is
| | 07:14 | interesting because you noticed
earlier that the Yahoo! blog is built on
| | 07:18 | WordPress, but Drupal is used to
build this page for Yahoo! Research. Once
| | 07:23 | again it has a Tabbed Navigation System.
Many, many links, but it's also very
| | 07:27 | graphical.
| | 07:29 | Now you know what a Content Management
System is, and have seen some examples
| | 07:32 | of what CMSs can do.
| | 07:34 | We'll examine some of the benefits and
disadvantages of Drupal when compared
| | 07:38 | with other CMSs and help you decide
whether it's the right CMS for you.
| | Collapse this transcript |
| Choosing Drupal| 00:00 | Out of all the CMSs out there, is
Drupal right for you? Here is a general
| | 00:04 | overview of what Drupal does best,
as well some things that are more
| | 00:08 | appropriate for other website creation systems.
| | 00:11 | First, let's start with Drupal's
advantages. First of all it's somewhere in the
| | 00:15 | middle between ultimate
customizability and the out of the box ease that you
| | 00:19 | get from some content management
systems, that is, you don't have to program
| | 00:22 | everything, but you can do a lot.
| | 00:24 | Second of all, Drupal has proven
insecure, it's been around for several years
| | 00:29 | and it's been used by thousands of
different sites. Although it does
| | 00:32 | occasionally have security updates it
is generally a secure enough system to
| | 00:36 | use for pretty much anything.
| | 00:38 | Third of all, Drupal has very strong
community support and we will show you
| | 00:41 | little bit of that community support now.
| | 00:44 | First of all, Drupal has many pieces of
software that are available as plug-ins
| | 00:48 | to the main Drupal program. These are
called Modules and they add additional
| | 00:51 | functionality beyond what the core
Drupal program provides. These are divided
| | 00:57 | into many categories, for example,
there are content categories which lets you
| | 01:01 | display the things that you write and
produce in different ways. There are all
| | 01:04 | sorts of administration plug-ins, which
let you change the way that you manage
| | 01:08 | your site.
| | 01:09 | All the way down to e-Commerce
modules which lets you connect to existing
| | 01:13 | systems you might have for
credit cards for example or PayPal.
| | 01:17 | Another part of the Drupal community
is in its themes, themes let you change
| | 01:21 | the way that your Drupal website looks,
and as you go through this page which
| | 01:25 | is at drupal.org/project/themes, you
can see snapshots of many of the different
| | 01:31 | kinds of pages that you can make your
Drupal website look like. These are all
| | 01:35 | provided by people from outside in
the Drupal community and almost without
| | 01:39 | exception they are available for free.
| | 01:43 | Thirdly, the Drupal community is very
active in talking with itself, so that if
| | 01:48 | you have any problems with your
Drupal installation or after your Drupal
| | 01:52 | installation you can go in and you can
get your answers very quickly for free
| | 01:56 | from other people who
have faced the same problems.
| | 01:59 | Fourth, Drupal is an open source project,
which means it's built by many people
| | 02:03 | in the community. In this case it's
built on two additional open source
| | 02:07 | projects PHP as the programming
language and SQL, which is the database
| | 02:13 | language.
| | 02:14 | Finally, there are numerous commercial
companies out there supporting Drupal.
| | 02:17 | One of those companies is Lullabot,
which offers workshops and training, writes
| | 02:22 | articles and blog posts that will
teach you more about Drupal and so forth.
| | 02:25 | They also do commercial support for Drupal.
| | 02:28 | Another commercial support company for
Drupal is Acquia. This is a company that
| | 02:33 | was actually founded by the
original person who wrote Drupal.
| | 02:38 | There are numerous sites out there
that are built on Drupal. Some of the
| | 02:40 | largest ones are The Onion at theonion.com,
Amnesty International at amnesty.org and
| | 02:46 | Popular Science at popsci.com, so you
can see a great variety there. The first
| | 02:51 | one is a humorous magazine, the second
one is an international organization and
| | 02:55 | the third one is a popular magazine
that's been around for dozens-and-dozens of
| | 02:59 | years and has made the move online using Drupal.
| | 03:03 | Now that we have talked about some of
the good things about Drupal, let's talk
| | 03:06 | about some of its disadvantages.
First of all Drupal has greater technical
| | 03:10 | knowledge requirements than you would
have if you were just writing a website
| | 03:14 | by scratch in HTML. You need to have
access to the server and you need to have
| | 03:19 | certain permissions on that server. In
addition that server has to have certain
| | 03:23 | programs already installed, most
notably PHP and SQL database, preferably MySQL
| | 03:29 | and the cron program.
| | 03:31 | Finally although you don't need to
know HTML or any of the other traditional
| | 03:36 | web skills to customize your Drupal
site, it does help to have HTML, CSS and
| | 03:42 | certain graphics editing skills in order
to bring your Drupal site to its full flower.
| | 03:47 | Drupal has certain design biases. If
you go and take a look at sites that are
| | 03:50 | built under, well, you'll notice the
very often there will be a left column and
| | 03:54 | a right column and a content in center
and a header at the top and it tends to
| | 03:58 | be the same from theme-to-theme. The
good news is that all of that can be
| | 04:02 | customized; the bad news is you may
have to do a certain amount of work to make
| | 04:06 | that customization happen.
| | 04:08 | So when shouldn't you use Drupal?
First of all, if it's going to be overkill,
| | 04:13 | there is no need to use Drupal. A site
that doesn't change much doesn't really
| | 04:17 | need Drupal, because what Drupal is
good at is letting you bring in new
| | 04:20 | information at any time and
change what's already there.
| | 04:23 | Sites that are just plain static sites
that don't have any sort of community
| | 04:27 | interaction don't really need Drupal.
You can build sites like those in Drupal,
| | 04:31 | but you don't need to.
| | 04:33 | Drupal is also overkilled when you have
solid simpler alternatives or once that
| | 04:37 | are built more specifically to your
purpose. For example, there is a Wiki
| | 04:41 | plug-in, a Wiki module for Drupal, but
if you are going to build just a Wiki,
| | 04:46 | you might as well use MediaWiki, which
is built specifically for that purpose.
| | 04:51 | You shouldn't use Drupal when you
don't have the technical help or abilities
| | 04:54 | that you will need to install and run it,
and we will talk more about what you
| | 04:57 | need to run Drupal throughout the course.
| | 05:00 | Finally you shouldn't use Drupal if
it's going to be an extremely high-traffic
| | 05:04 | or mission-critical site. If it's
necessary to have this site online in order
| | 05:08 | to save lives you should probably use
something else or at least use something
| | 05:12 | else as a backup. If you are going
to run something that's going to have
| | 05:15 | millions and millions and millions of
page views probably Drupal is not the
| | 05:19 | right solution. Although I should
mention, Drupal does run very popular sites.
| | 05:24 | I hope this video has given you a sense
of when Drupal is best for you and when
| | 05:27 | to look for a simpler or
more heavy-duty solution.
| | Collapse this transcript |
| Checking Drupal's requirements| 00:00 | Let's assume that you have decided
that Drupal is right for you, but are you
| | 00:04 | right for Drupal? Do you have
everything it needs? Drupal isn't a demanding
| | 00:08 | partner but it does require some
technical knowledge resources from you.
| | 00:12 | This video will show what those
requirements are and how to get those that you
| | 00:16 | don't already have.
| | 00:18 | First let's start with those things
that are useful to know. Not the things
| | 00:21 | that you need to know but the things
that are useful to know. HTML is first and
| | 00:25 | foremost because you will be using it
to post content. However, there are also
| | 00:30 | rich text editors that are available, that
make it less necessary for you to know HTML.
| | 00:36 | The programming language PHP is also
very useful to have, that will let you
| | 00:41 | change themes that you have and perhaps
eventually add your own functions via modules.
| | 00:46 | Third, it's useful if you know the
database language SQL. With SQL you will be
| | 00:52 | able to go in and change things
directly in the database in case your Drupal
| | 00:55 | installation is starting to have problems.
| | 00:58 | Fourth of all, it's helpful if you
have some system administration abilities
| | 01:02 | because you may have to move files to
and from the server, you may have to
| | 01:05 | change permissions on the server and so
forth. But what you need to know to run
| | 01:10 | Drupal? Not much.
| | 01:12 | Aside from the four things that
are useful to know Drupal is a pretty
| | 01:15 | self-contained system and you can do everything
that you need through its web interface.
| | 01:20 | Aside from knowledge requirements
Drupal does have some technical requirements
| | 01:24 | for installation.
| | 01:25 | First of all, if you are working on
a remote server you will need an FTP
| | 01:29 | program that is File Transfer Protocol.
There are many of these available in
| | 01:33 | the market and many of them are free.
| | 01:35 | Secondly, you will need access to
a server, which allows you to make
| | 01:39 | directories. Because you are going to
be putting your Drupal installation and
| | 01:42 | it's reporting files into different
directories or folders on that server.
| | 01:47 | Third of all, you have to also be
able to change permission levels on that
| | 01:51 | server. So if for example, Drupal needs
to write information to a certain file
| | 01:55 | you have to be able to change that
file so that Drupal is allowed to write to
| | 01:58 | that file.
| | 02:00 | Fourth of all, I recommend that you
get some sort of server where you have
| | 02:04 | access via the Shell. The Shell is the
command line access system that lets you
| | 02:08 | type things in instead of using a
graphical interface. There are many things
| | 02:12 | that are possible on the server
only through a command line interface.
| | 02:16 | There are four things that Drupal needs
already installed on the server. First
| | 02:20 | and foremost of these, and this should
be obvious is a Web Server. Apache is
| | 02:25 | the one that's preferred by Drupal,
although it is possible to do using
| | 02:28 | Microsoft IIS and it might be
possible using other web servers.
| | 02:32 | However, Apache is the one that's most
discussed in drupal.org and within the
| | 02:36 | Drupal project, so if you have any
problems you will be better off running
| | 02:39 | Apache since more people
will be able to help you.
| | 02:42 | You will need an SQL server. The
preferred one is MySQL although PostgreSQL is
| | 02:47 | also possible.
| | 02:49 | Third, you will need certain other
supporting programs, primary among them is
| | 02:53 | cron. cron is a program available for
the server that runs certain procedures
| | 02:58 | at a periodic interval. So for example,
every hour it might send out mail from
| | 03:03 | the Drupal system or every hour it might
fetch additional news from another server.
| | 03:07 | If you don't have these three things,
you may be able to get them all in one
| | 03:11 | integrated package. This is known as
LAMP, MAMP or WAMP. LAMP stands for Linux,
| | 03:17 | Apache, MySQL and PHP. MAMP stands for
the same thing but starting with Mac,
| | 03:23 | and W stands for the same
thing starting with Windows.
| | 03:26 | MAMP is available from mamp.info
and WAMP is available from
| | 03:32 | www.en.wampserver.com. Although if
you go directly to wampserver.com, you
| | 03:38 | should be able to get there by clicking
on the appropriate language flag link.
| | 03:42 | If you don't have all these things
there are a number of Drupal consultants out
| | 03:45 | there and you can see a directory of
these at drupal.org/drupal-services. You
| | 03:51 | can see a directory of who's
available to help you with your Drupal
| | 03:54 | installation by going to
drupal.org/drupal-services.
| | 04:00 | If you are unable to install Drupal
on a server, there are some Internet
| | 04:03 | service providers who are already
hosting Drupal or will let you install it
| | 04:07 | very easily. There is a list of
such services at drupal.org/hosting.
| | 04:13 | As I said earlier, you don't really
need that much to run Drupal, and what you
| | 04:17 | don't have now is easy to get whether
through a package like MAMP or in the
| | 04:21 | most hands off way possible through
the help of experts and hosted services.
| | Collapse this transcript |
| Understanding the inner workings of Drupal| 00:00 | Drupal-based sites look somewhat
different from those built in plain-old HTML.
| | 00:05 | Now we are going to look at Drupal's
inner workings to understand exactly what
| | 00:09 | happens when visitors request a page
from Drupal. It's actually quite different
| | 00:12 | from the mechanism of an HTML site
and understanding the differences is
| | 00:16 | important as you go forward in
building and maintaining your Drupal site.
| | 00:21 | Let's start by taking a look at what
happens when you try to get a page from an
| | 00:24 | HTML site. There you are sitting at home,
you ask for the page and your request
| | 00:30 | goes to a web server. Usually it's
going to be the Apache Web Server. The web
| | 00:34 | server then delivers a page such as
index.html, that page in turn will pull
| | 00:40 | together all of the resources that it
needs to present something to you that
| | 00:43 | will be text and graphics files, and
possibly other files in processes that
| | 00:48 | might for example include PHP programs.
| | 00:51 | Once the page has been created it gets
sent back to the web server, which then
| | 00:56 | goes to you, and you see it on your Web Browser.
| | 00:58 | Let's take a look at some of the files
that are inside an HTML site. In this
| | 01:02 | case I used my own site, tomgeller.com.
It's actually quite simple, all of the
| | 01:08 | files that you can call from a Web
Browser and an HTML in this case,
| | 01:12 | clients.html, endorsements.html and
so forth and the way that this site is
| | 01:17 | constructed the additional things
that you need are in sub-directories,
| | 01:21 | graphics, portfolio and so forth. In
addition there is a cascading style sheet
| | 01:26 | here which ends with .css.
| | 01:29 | Now we are going to take a look at what
happened when somebody requests a page
| | 01:32 | from a Drupal website. Once again
there you are sitting at your computer and
| | 01:36 | you make the same sort of request to
an Apache Web Server. However, in this
| | 01:40 | case, instead of going to an HTML file
it actually calls up a PHP program. That
| | 01:46 | program in turn calls together graphic
files, but also data that are inside of
| | 01:50 | an SQL database, and it might also call
additional PHP programs or other types
| | 01:56 | of programs. All of these things are
taken and put together by the PHP program
| | 02:02 | as a page, which again gets sent back
to the web server and then goes back to you.
| | 02:08 | If we take a look at the files in a
Drupal site, we notice something very
| | 02:12 | interesting. I am going to rearrange
these by type here. None of these files
| | 02:17 | end in HTML these, text files are
really just Help files, but the main parts
| | 02:22 | end in PHP.
| | 02:24 | Let's open up this index.php file,
which is what someone calls when they go to
| | 02:28 | the main page of a Drupal website and
here we are. If you know HTML, you will
| | 02:33 | notice that this looks nothing like the
HTML that you are used to because it is
| | 02:36 | in fact PHP programming language.
| | 02:39 | Let's look through this index.php file.
All of these things at the beginning
| | 02:44 | are just common. So the first real
command in the PHP file is this requireonce
| | 02:48 | ./includes/bootstrap.inc, and if you
go back to your file structure you can
| | 02:55 | actually go into the folder
called includes and find that file.
| | 02:58 | So this one PHP program is immediately
calling another PHP program, and if you
| | 03:04 | go inside this you will find that it
calls others and others, and say you have
| | 03:07 | this whole cascade of PHP programs that
eventually come together to create your page.
| | 03:13 | At first this might seem like an
incredibly convoluted and wasteful way to call
| | 03:16 | a simple web page, but in practice
it's not. PHP doesn't require very many
| | 03:21 | resources to switch among files like
this, and the computer quite naturally
| | 03:25 | navigates among them according to logic.
| | 03:27 | However, this computer-friendly
structure can be extremely user-unfriendly if
| | 03:33 | you are trying to figure out where
certain commands came from or where to put
| | 03:36 | files to change the way
your site looks and acts.
| | 03:39 | In brief the default location for
your site's overall appearance called its
| | 03:44 | Themes are in the themes folder, and
you can see here these are different
| | 03:49 | themes that show up in Drupal.
| | 03:52 | Files that are specific to an
individual site go into the sites folder and you
| | 03:58 | have a choice to make certain files
available to all of your Drupal sites or if
| | 04:02 | you are just running one Drupal site,
you could put into the default folder.
| | 04:05 | I hope that you haven't been scared
away by this description of Drupal's inner
| | 04:08 | workings, which can admittedly be
pretty intimidating. The good news is that
| | 04:13 | you don't have to know most of this
to run a Drupal site as most of the
| | 04:17 | administration is done through a web
browser based interface and a FTTP program.
| | 04:22 | Still, understanding some of these
points that your content is stored in a
| | 04:26 | database for example instead of HTML
files we will help you in putting together
| | 04:31 | your Drupal site.
| | Collapse this transcript |
| Meeting the Drupal community| 00:00 | One of Drupal's strengths is its
extensive community of users and developers who
| | 00:04 | use Drupal every day and are ready
to help you through the tough spots.
| | 00:08 | As Drupal is open source software its
community is also a good place to gain
| | 00:11 | experience, credibility and connections
for your contributions to the project.
| | 00:16 | Finally, the Drupal community can be a
gateway to jobs, especially as Drupal
| | 00:21 | grows in popularity in organizations,
and in the enterprise market. This video
| | 00:26 | will show you where to find these
resources and how to take best advantage of them.
| | 00:31 | But, first let's talk about how
Drupal got to where it is today?
| | 00:35 | Drupal started as a project of the
Flemish-Belgian student Dries Buytaert. In
| | 00:40 | 2000, he was a student at the
University of Antwerp and he wanted a way for
| | 00:44 | himself and his friends to transfer
information back and forth, and so he
| | 00:48 | created this Bulletin Board System
and he called it Drop. And if you go to
| | 00:52 | archive.org you can see the original
drop.org website which we can see right
| | 00:57 | here from 2000.
| | 00:59 | He decided to make an open source
project and gave it the GPL that is the GNU
| | 01:03 | Public License in 2001. By doing so he
is allowing everybody in the world to
| | 01:08 | contribute to it, and to extend it as
they like, and from there of course it
| | 01:12 | took off as many open source software
projects too and by the end of that year
| | 01:17 | it already reached version 3.0 at
which point he also renamed it Drupal.
| | 01:21 | As I am making this video Drupal is at
version 6.3, the oldest version that's
| | 01:27 | still supported at this time is
version 4.7 which came out in 2006. There are
| | 01:32 | still people using version 4.7 and
they are quite a number of people using
| | 01:36 | version 5.
| | 01:38 | Every year Dries Buytaert releases
statistics of how many people have
| | 01:42 | downloaded the Drupal project, and
you can see that on his website it
| | 01:45 | buytaert.net.
| | 01:47 | In July of 2008, he released the
statistics for this year and they showed that
| | 01:52 | in the previous year there had been
about 600,000 downloads of the Drupal core.
| | 01:57 | In this year they were about 1.4
million and as you can see from change in
| | 02:01 | color which represents a change in
version number quite a few people have
| | 02:05 | downloaded version 6, which is a
good sign for the Drupal community.
| | 02:10 | The first place that you should be
going to is drupal.org. This is the site
| | 02:14 | where pretty much everything happens.
One of the advantages that Drupal has is
| | 02:19 | that everything goes through drupal.
org if you need contributed code to help
| | 02:23 | make your site better, you can find it
on drupal.org if you need help and so
| | 02:28 | forth. More specifically let's take a
look at some other things that are on
| | 02:31 | drupal.org.
| | 02:33 | Starting with documentation, there are
Getting Started guides, so if you just
| | 02:38 | need to get up and running very quickly,
you can do that there. In addition,
| | 02:41 | there are some very detailed
installation and configuration help in this beyond
| | 02:46 | the basics area. Once again, you can
get there by going to Documentation and
| | 02:52 | Detailed Installation Help
here below Beyond the Basics.
| | 02:56 | Additionally, there are more beyond
the basics things here, which will give
| | 03:00 | you, for example, contributed code
that will help you add functions to your
| | 03:04 | site without having to install
an entire new module and so forth.
| | 03:11 | The Download section has many
useful things that can be brought to your
| | 03:14 | computer. The two most important of
which are Modules and Themes. Modules are
| | 03:21 | little plug-ins that you can put into
your Drupal site to give it additional
| | 03:25 | functionality, and as you can see there
are many categories of modules. All you
| | 03:29 | need to do is grab them, put them into
your Drupal folder and enable them and
| | 03:34 | we will show you how to do that
in another video in this series.
| | 03:39 | Themes will change the way that your
site actually looks; it will change the
| | 03:42 | entire face of your site. If you have
ever played with any games or used any
| | 03:47 | programs that have skins it's
very much like a skin to your site.
| | 03:51 | For example, looking down the page you
see screenshots of the different kind of
| | 03:54 | themes that you can download and make
your Drupal site look very much like
| | 03:58 | these. From there you can of course,
modify them as you like, and the thing
| | 04:02 | about this is all of these themes are
contributed and free and available for
| | 04:07 | you from the drupal.org website.
| | 04:10 | But let's say that you come across a
problem that you're not able to solve.
| | 04:14 | Well, that's what the support area is
for. First of all they are all those
| | 04:17 | Drupal handbooks that we mentioned
earlier. There are also forums where you can
| | 04:21 | go and ask your question directly.
| | 04:23 | What I would recommend you do before
going in and just asking a question
| | 04:27 | blindly is to search the drupal.org
site. drupal.org very often has a search
| | 04:33 | bar up here where you can search the
site, however, whenever the site is under
| | 04:36 | a high load it will take off to make
it possible to reach the site without
| | 04:41 | weighing it down with a lot of searches.
| | 04:43 | If you need to search for something
and the search box is not there on
| | 04:46 | drupal.org you can go to google.com.
And I am going to do that right now. And
| | 04:53 | do your search, but first add sites:
drupal.org and then you might search for.
| | 04:59 | For example cck, which is a certain
kind of module in Drupal. And there you
| | 05:03 | have it, it searches
only the drupal.org website.
| | 05:06 | Again, that's not necessary if the
drupal.org search box is on the page and it
| | 05:11 | will show up somewhere up here.
| | 05:13 | Continuing on after you've gained some
Drupal skills, you might want to give
| | 05:18 | something back to the community, one
way you can do that, is you could go into
| | 05:22 | the forum and answers some of those
questions that people have been asking.
| | 05:26 | Another way is go to Contribute.
The Contribute page shows a number of
| | 05:30 | different ways that you can give back
to the community. First and foremost as I
| | 05:34 | say in the forums, second of all
there are other ways to give user support,
| | 05:38 | those are detailed here under user support.
| | 05:41 | If you are coder of course you can do
quite a lot in development. Both the
| | 05:45 | Drupal core, which is the main program,
and additional modules all need people
| | 05:50 | to help maintain them and your
contributions will be very much appreciated
| | 05:53 | there.
| | 05:54 | If you are not a coder however
there are still many ways that you can
| | 05:57 | contribute. For example, do you speak
another language? If so, may be you can
| | 06:01 | help translate the Drupal core so that
people in another countries can help use
| | 06:05 | it.
| | 06:06 | You can do that under this link here
for translations. If you are a Writer you
| | 06:10 | might be able to help with
Documentation or Marketing or Testing, no matter
| | 06:15 | what your field is, there is a way for
you to contribute to the Drupal project.
| | 06:19 | So you can see that if you actively
start creating sites based on Drupal you
| | 06:24 | certainly will not be alone. A large
and vibrant community of developers and
| | 06:28 | fellow users is out there to help you
find your feet and to build the best
| | 06:32 | Drupal site possible. All that you
need to do is reach out through the
| | 06:36 | drupal.org website.
| | Collapse this transcript |
|
|
2. What Can Drupal Do?Learning key terms in Drupal| 00:00 | As with any community the Drupal world
has its own slang. Fortunately, there is
| | 00:05 | not too much of it. But understanding
the few Drupal specific terms there are
| | 00:10 | will help you to communicate not only
with others who use Drupal but also to
| | 00:13 | understand some of the concepts you'll
need again-and-again as you create your
| | 00:17 | Drupal site.
| | 00:18 | The first important concept is that of
the node. In Drupal a node is any piece
| | 00:24 | of information that you create as a
single unit. For example, when we click
| | 00:28 | here on the drupal.org website we see
this page which is a node. It may link to
| | 00:34 | another nodes as it does here, and it
may appear as part of a page, a story, a
| | 00:40 | blog post, anything like
that. They are all nodes.
| | 00:44 | The second concept is a content type.
Content types distinguish one type of
| | 00:49 | node from another. In that list I
just gave page, story, blog post each of
| | 00:54 | those is a content type and can be
treated slightly differently in your Drupal
| | 00:59 | site. You will see more of
that as the course progresses.
| | 01:02 | The third concept to know is that of
the module. In Drupal a module is a piece
| | 01:07 | of software that you can put into
the Drupal to give it additional
| | 01:10 | functionality. On the drupal.org
website you get modules from Download and
| | 01:16 | Modules and here as you scroll down,
you can see a list of categories of module.
| | 01:22 | Next to them is the number of modules
that are available in that category. As
| | 01:26 | you can see there are many modules
in Drupal and we will be talking about
| | 01:29 | several of them throughout the course.
| | 01:32 | Another concept in Drupal is that of
the theme. A theme is a unified graphic
| | 01:37 | presentation for an entire Drupal site.
I will give you an example. You see the
| | 01:42 | blue area at the top of this site and
the typefaces of a certain sort? If you
| | 01:47 | go to the another Drupal site, in this
case savemyhomebook.com, which is my own
| | 01:53 | website You see that it has a
completely different look, different typefaces,
| | 01:58 | different colors, different layout and
so forth, that layout stays the same as
| | 02:02 | you go from page to page to page. And
in fact the Theme is what defines the
| | 02:09 | look of the entire site.
| | 02:13 | The next word to know is Core. The
Core is the basic set of modules that
| | 02:17 | included with the default Drupal
download. The Core is broken into two parts,
| | 02:22 | Optional modules and Required modules.
The Required modules are the very
| | 02:27 | centerpiece of the Drupal project,
without them, you can't run a Drupal site.
| | 02:32 | Fortunately, they're all included in
the download that you can get from the
| | 02:36 | front page of drupal.org.
| | 02:38 | The next word to know is Template. A
Template is a file in the programming
| | 02:42 | language PHP that defines how nodes of
a certain content type will appear. For
| | 02:47 | example, if your site was a catalog
of products, you could create a content
| | 02:52 | type called Product Listing and then
build a custom product-listing template so
| | 02:57 | that all products are presented in a
distinct but unified format. Building
| | 03:01 | templates is a very advanced subject
and we will only touch on it briefly in
| | 03:05 | the PHP chapter later in this course.
| | 03:08 | The next term to know is Taxonomy.
A taxonomy is how you put items into
| | 03:13 | categories; you might know this
from other websites as tagging.
| | 03:16 | For example, let's say that you have
a story about the election race for a
| | 03:20 | local town's mayor that might be put
into a politics category as well as a
| | 03:25 | category that has the name of the town.
These categories and the system that
| | 03:29 | you set up to put that story into
those categories is known as its Taxonomy.
| | 03:34 | Drupal allows a very broad system of
taxonomies and you will see how that works
| | 03:39 | also in this series.
| | 03:40 | The next term to know is Aggregator.
An Aggregator is a program that collects
| | 03:45 | information from various sorts and
puts them in one easy to read place. It's
| | 03:49 | also commonly known as an RSS Reader.
Drupal has an Aggregator built into it,
| | 03:54 | so you can display syndicated content
from many places on your Drupal site, and
| | 03:59 | if you return to my site savemyhomebook.
com, and go back to the home page, this
| | 04:05 | latest foreclosure news is actually
using Drupal's aggregator, it pulls in new
| | 04:11 | stories from around the web
and posts their headlines here.
| | 04:15 | Another term to know is Drupalcon,
and you can see that on the home page of
| | 04:20 | drupal.org, if we click on it, we
go to its home page at drupalcon.org.
| | 04:24 | Drupalcon is a semi-annual gathering
of Drupal developers, and that gathering
| | 04:29 | moves from city-to-city. As you
could see the one coming up next as we're
| | 04:33 | making this video is in Szeged, Hungary.
| | 04:36 | Another part of the Drupal community
whose name you should know is the Drupal
| | 04:40 | Association. The Drupal Association
is an organization dedicated to as the
| | 04:45 | website says, Helping the open
source Drupal CMS project flourish. Its
| | 04:50 | President is Dries Buytaert, who is
Drupal's original creator. You can go to
| | 04:54 | the Drupal Association's
website at association.drupal.org.
| | 05:00 | The last word to know is an odd little
word for an odd little item, Druplicon.
| | 05:05 | The Druplicon is this little mascot up
here that looks like a drop of water.
| | 05:10 | And there you have it. While
discussions on drupal.org can get pretty technical
| | 05:14 | you now know enough jargon to
understand most of what you read there.
| | Collapse this transcript |
| Touring Drupal's interface| 00:00 | If you looked at several Drupal built
sites, you have probably remarked on the
| | 00:04 | amount of visual variety there is
among them. But under the hood, there are a
| | 00:08 | lot more similarities than differences.
That's to your advantage because once
| | 00:12 | you've built one Drupal site, it's easy
to figure out how to manage any Drupal site.
| | 00:16 | This video will show you some of
those similarities. We will be working
| | 00:20 | on a site that you can create by
importing the database, that's in your example
| | 00:24 | files. If you need to know how to do
that refer to the other video in this
| | 00:29 | series on working with the example files.
| | 00:31 | We will be working with a site that
you can create yourself by importing the
| | 00:36 | database and graphics files that are
included in your exercise files. If you
| | 00:42 | need help doing that see the separate
video in this series on importing the
| | 00:46 | exercise files. In order to do this
video you'll need to be logged in at the
| | 00:50 | Administrator. We're already
logged in the Administrator here.
| | 00:54 | The first thing to know when you are
administrating on Drupal site is your way
| | 00:57 | around the Administer Menu, which is
almost always found in the left-hand
| | 01:01 | column of your Drupal installation.
Click on it now, and you will see a list of
| | 01:06 | different parts of Drupal that you
could administer from within that menu.
| | 01:10 | In the main section of this screen
all of the different parts are listed
| | 01:13 | individually. These are also in
categories, which are separated in these blocks
| | 01:18 | of gray or along the left-hand side in
these individual links. If you click on
| | 01:24 | Content Management for example,
you'll see a list of all of the different
| | 01:28 | things that you can administer from
within Content Management. If we go back
| | 01:32 | you'll see the same sorts of
links that you saw in the gray box.
| | 01:36 | When you are on the Administer
screen I often found it easier instead of
| | 01:40 | searching for a specific part that you
want to administer by just using your
| | 01:44 | browser's Find function. So for
example if I want to say, oh! What are the
| | 01:49 | permissions instead of scrolling down
and looking for the word Permissions
| | 01:52 | among all of these I'll just hit
Command F or Ctrl+F if you are using a PC and
| | 01:57 | type-in permissions, and there we go,
once we are there we can just click on
| | 02:03 | Permissions and go straight
to that administration screen.
| | 02:06 | Now, let's go back to the main
administration page. After you have been working
| | 02:11 | with Drupal for a while you'll
realize that you don't need all of this
| | 02:14 | descriptive text, and in fact, it
makes you scroll down a lot to find things.
| | 02:18 | You can hide those descriptions by
clicking up here where it says High
| | 02:21 | descriptions. That makes your screen
much more compact. We are going to show
| | 02:26 | those descriptions again,
since we are not quite that good.
| | 02:30 | Let's take a look at one of these
administration pages. A fairly simple one is
| | 02:34 | if you scroll down toward the bottom
and look at Site Information, this is a
| | 02:40 | place where you can change some of the
basic things that make up your site. For
| | 02:43 | example, the title when you type that
in here it appears up at the top of the
| | 02:47 | page on every page. There is also a
place for a Slogan and a Mission Statement.
| | 02:52 | These can show up on your page as well
depending on what your theme settings
| | 02:56 | are.
| | 02:57 | At the bottom of virtually every
administration page, you'll also find a Save
| | 03:01 | Configuration and Reset to Defaults
button. Obviously, this one cancels what
| | 03:06 | you have been doing while the Save
Configuration button saves it. Whenever you
| | 03:11 | saved something or if there is an error
you will see a message at the top that
| | 03:15 | will tell you exactly what's happened.
Be careful because it's easy to miss
| | 03:19 | this message if you are not looking for it.
| | 03:21 | As you can see, Site Information is
only one of many administration pages and
| | 03:27 | they vary somewhat in how they work.
We will look at some other types of
| | 03:30 | administration pages elsewhere in this
series, but you can generally figure out
| | 03:34 | what's going by using
Drupal's built-in help system.
| | 03:38 | For example, let's go up to this By
module tab. This shows many of the
| | 03:43 | administration pages in a slightly
different form depending on function. For
| | 03:47 | example, the Block administration page
has the Blocks menu right here which is
| | 03:53 | the same as on the previous page, but
it also has a link to show how to set
| | 03:57 | permissions which will allow you and
your users to do certain things within
| | 04:01 | that block module. On this page you'll
also find a Get help link from any of
| | 04:06 | these modules.
| | 04:07 | When you click on that you will get
additional information, and the amount of
| | 04:11 | information that you get depends on the
module. That's one way to get help. But
| | 04:15 | there is one other.
| | 04:16 | In the left-hand column under
Administer you'll notice there is Help link right
| | 04:21 | here. This will give you help pages for
all of the modules that are installed.
| | 04:26 | That's very useful especially
when you are first starting out.
| | 04:29 | At any time you can get to the front
page of this site, by clicking either on
| | 04:34 | the logo or on the title of this site.
Both of those who will bring you to your
| | 04:37 | homepage.
| | 04:39 | Drupal stores its content in parts
called Nodes and each node can be edited if
| | 04:44 | you have the permissions to edit it.
For example, this story up here at the top
| | 04:48 | was created as what's called the Page.
A Page is a type of node and you can
| | 04:52 | edit it as with any other node by
clicking on the title of the node, right
| | 04:56 | here. If you have the permissions to
edit it you will see this little Edit tag
| | 05:00 | here, if you don't you'll
only see the node itself.
| | 05:03 | So now you have seen a few things
about the Administrator's interface. Let's
| | 05:07 | logout to see how an anonymous
visitor to your site will see it.
| | 05:10 | There, now you've noticed a few things,
first of all, it no longer says Admin
| | 05:14 | up here instead it has a
place for the user to log-in.
| | 05:19 | Also the Contact Us link is no
longer up here, that's because anonymous
| | 05:23 | visitors to the site are not allowed
to contact the Site Administrator by the
| | 05:27 | way that we set up our permissions. The
administrator of a Drupal site actually
| | 05:31 | has a lot of control over what an
anonymous user can and can't do and can even
| | 05:36 | segment registered users so some have
certain permissions while others don't.
| | 05:40 | So while Drupal's interface is pretty
consistent overall, it changes quite a
| | 05:44 | bit depending on how much you or the
Site Administrator have given anonymous
| | 05:48 | users and registered users.
| | 05:50 | Are you starting to feel more
comfortable with Drupal? If not, try going to
| | 05:54 | some Drupal-built sites, such as drupal.org
or amensty.org, and you'll start into
| | 05:59 | it commonalities among them, and of
course poking around the administrative
| | 06:03 | interface if your own group of
site is the best teacher of all.
| | Collapse this transcript |
|
|
3. Installing DrupalInstalling WAMP and Drupal on Windows| 00:00 | If you plan to run Drupal on a
computer with Microsoft Windows and you aren't
| | 00:04 | already a whiz at managing Apache,
MySQL and PHP on your computer, then this
| | 00:09 | video is for you. If you'll be running
Drupal only on Mac OS X, go to another
| | 00:14 | video in this series instead, Installing MAMP.
| | 00:18 | To download the WAMP Server, which is
free software, go to wampserver.com. Once
| | 00:23 | at the site, you might find that it's
in French. If so, click on the British flag here.
| | 00:29 | The WAMPServer comprises three parts:
Apache, MySQL, and PHP. When you are
| | 00:35 | ready, go to the bottom of the
screen and click on Step One; Download the
| | 00:39 | latest release of WAMPServer 2.
| | 00:42 | The download page gives you some
important information; most notably, it warns
| | 00:46 | you not to try to install WAMPServer
over an existing installation. If you have
| | 00:50 | downloaded it before,
don't try to install it again.
| | 00:54 | Once you ready, click on the
Download link. We have already downloaded
| | 00:57 | WAMPServer to our desktop. To show it,
minimize your Browser window. Then
| | 01:02 | double click on the icon to install.
As with most installers, you will be
| | 01:06 | walking through a series of screens.
Click on Next if you agree with what the
| | 01:10 | screens says. But first, you will
be warned once again not to install
| | 01:14 | WAMPServer over an existing
installation of WAMPServer.
| | 01:17 | In our case, we haven't installed it
before, so we click Yes. This is the
| | 01:22 | introduction screen. We click Next,
and get the License screen. Read through
| | 01:27 | it, and if you agree to accept it,
change the radio button to I accept the
| | 01:30 | Agreement, and then click Next.
| | 01:32 | By default, WAMPServer installs at the
top level of your C drive. We are fine
| | 01:36 | with that, so we will click Next.
| | 01:39 | You have the options of putting a
Desktop icon and a Quick Launch icon on your
| | 01:43 | computer. Regardless of what you
enter here, an icon will be placed in your
| | 01:47 | system tray; that's the
main way to control WAMP.
| | 01:50 | We are not going to select either
of these, so we will just click Next.
| | 01:55 | Finally, we get this installation
screen. Click Install to complete the
| | 01:58 | process.
| | 02:01 | The WAMP files will install, this will
take a few minutes. Once the WAMP files
| | 02:07 | have installed, you will be asked to
choose your default browser. Generally
| | 02:11 | speaking, you can leave it as it is,
and just click on Open, however if you
| | 02:14 | like, you can look through your
Windows files and choose a different web
| | 02:18 | browser. In our case, we are going to
leave it as Explorer and click Open.
| | 02:24 | Finally, you will be asked for an
Email address and the mail server. In our
| | 02:28 | case, we are going to leave this as it
is. However, Drupal will require this
| | 02:32 | information and as you will see later,
it can cause an error during the Drupal
| | 02:35 | installation. In our case it doesn't
matter since we are only installing on a
| | 02:38 | local machine, and won't
be sending email from it.
| | 02:42 | Finally, you have an option to launch
WAMP once its installed. We are going to
| | 02:45 | leave that on and click Finish.
| | 02:48 | Once WAMP has been installed, you
will see an icon in your system tray. The
| | 02:52 | first option is to put WAMPServer
Online. Directly above that you have the
| | 02:57 | option to Start, Stop, or Restart All
Services. In this case we are talking
| | 03:02 | about MySQL and Apache.
| | 03:05 | You can also control those services
along with PHP individually. Here we see
| | 03:09 | MySQL; you can look at the Version
information, Start or Stop the Service, or
| | 03:15 | actually enter SQL
commands in the MySQL console.
| | 03:19 | In PHP, you can look at the version,
you can turn ON and OFF many settings,
| | 03:23 | along with many Extensions. We are not
going to touch these, because that's a
| | 03:27 | rather advance topic.
| | 03:28 | You can also change the php.ini, which
controls such matters as how much memory
| | 03:33 | is available to applications.
| | 03:35 | In the Apache selection, once again,
you can look at the Version of Apache you
| | 03:39 | are using, Start and Stop the Service
itself, and look at some of the Options
| | 03:43 | available for Apache, which are called
Modules. Once again, we won't be looking
| | 03:47 | at these in this course.
| | 03:48 | You can Alias directories, so one
directory actually points to another. You can
| | 03:52 | change the httpd.conf file, which is
again beyond the scope of this course, and
| | 03:58 | look at the some of the Apache longs.
| | 04:00 | The next option is to open up the www
directory; this is the directory where
| | 04:05 | you will actually be storing your
Drupal files. We will return to it in a
| | 04:09 | minute.
| | 04:09 | SQLiteManager and phpMyAdmin are both
used to control the MySQL database. We
| | 04:15 | will be using phpMyAdmin.
| | 04:18 | Finally, you can look at your home
page as its being served up by WAMPServer.
| | 04:21 | We will do that now.
| | 04:24 | By default, WAMPServer installs this
index page, which has some information
| | 04:28 | about the server itself, and links to
some of the tools you can use to control
| | 04:32 | it. At the top of the screen, you
can see the Apache version and the PHP
| | 04:36 | version, along with some of the
extensions that control these programs.
| | 04:40 | Below that, you also see the MySQL
version. Continuing on, you see some of the
| | 04:45 | tools you can use to control PHP and
MySQL. Clicking on any of these brings you
| | 04:50 | to that page.
| | 04:52 | Finally at the bottom, if you have
created any aliases in your Apache
| | 04:55 | configuration, you see them here and
can go directly to them. For us though, we
| | 05:00 | are going to go to phpMyAdmin and set
up the database that we need for Drupal.
| | 05:05 | phpMyAdmin is an administrative tool
that lets you control your MySQL database.
| | 05:10 | We will be using it throughout the
course. To create the database that we need
| | 05:14 | for Drupal, go to this Create new
database area, and type in the name of the
| | 05:17 | database you would like. We are going
to use the name drupal and click Create.
| | 05:21 | You don't need to change any
other setting on this page.
| | 05:25 | If the process is successful, you
will see this information at the top,
| | 05:29 | Database drupal has been created. Now
we will switch back to our other browser
| | 05:32 | window and download the Drupal Project itself.
| | 05:35 | To do so, go to drupal.org.
| | 05:39 | On the front page you will see links
to the most recent version; in our case
| | 05:43 | Drupal 6.3. By clicking on the version,
we get a page of information about it
| | 05:48 | and a download link. We have already
downloaded Drupal to our desktop so we are
| | 05:52 | going to click Cancel. However, you of
course should save it wherever you would
| | 05:56 | like to.
| | 05:56 | We hide our browser window, and
there we see our drupal file that we have
| | 06:00 | downloaded. By double clicking on it,
we get a folder very much like the one
| | 06:04 | you see here labeled drupal-6.3; this
contains all of the file that we need to
| | 06:09 | run Drupal.
| | 06:10 | Our next step is to copy all of these
files into our www directory. To get
| | 06:15 | there, we go to our Computer, which
brings us to the C drive, open that up, and
| | 06:21 | go to the wamp folder. Inside the
wamp folder, you will see a folder called
| | 06:26 | www. Open that up, and you will see
the index.php file that created that page
| | 06:33 | we saw earlier. To delete it,
right click on it and select Delete.
| | 06:39 | Finally, you will copy all of those
files from your drupal folder over to this
| | 06:43 | location. To do so, hold down Ctrl+A to
select all the files. Then right click,
| | 06:49 | and select Copy. Click in your www
folder, right click, and select Paste. After
| | 06:56 | a moment all of the files
will be copied into this folder.
| | 07:00 | You can now take a look at your
Drupal installation through a web browser
| | 07:03 | window. To do so, we will go back
into our web browser and type in
| | 07:07 | http://localhost, or just remove the
phpMyAdmin from the URL you see here.
| | 07:15 | There we are, Drupal is now ready to
go through its installation process
| | 07:18 | through the Web Browser
Administration Interface.
| | 07:21 | To start, click on Install Drupal in
English. You will be warned that you need
| | 07:25 | to create a certain file; this file
is called settings.php, and it's in the
| | 07:30 | sites/default folder. To create it,
copy the file called default.settings.php
| | 07:37 | and rename it settings.php.
| | 07:43 | Then return to your Drupal screen and
click the try again link. Now we can
| | 07:49 | point our Drupal installation at the
database we created earlier. The Database
| | 07:54 | name that we gave it is drupal. The
Database username for WAMP is root, and you
| | 07:58 | don't need a password. You may wish to
change this later for security purposes,
| | 08:03 | look at the WAMP documentation for
more information. Click Save and continue,
| | 08:07 | and Drupal does some final
steps in its installation.
| | 08:11 | Now you are asked for some more
information in order to personalize your site.
| | 08:14 | We will put in our E-mail address,
which in our case is admin@example.com, and
| | 08:21 | create the first user in Drupal. This
will be the superuser that has extra
| | 08:26 | privileges over all other users.
Don't forget this username.
| | 08:30 | You will notice the E-mail address
for that user is already filled in; it
| | 08:35 | assumes that you are going to use the
same as the administrative email. We
| | 08:38 | enter a Password; for us that's booth.
| | 08:42 | Drupal will warn you if it thinks that
your password is not secure enough and
| | 08:45 | give you suggestions on
how to make it more secure.
| | 08:48 | We can set out time zone, which Drupal
will actually read from your computer
| | 08:52 | and take a best guess as
to what your time zone is.
| | 08:55 | Then there are two things down at the
bottom; Clean URLs is something we will
| | 08:59 | be discussing in a separate video, and
we will explain how you can change your
| | 09:03 | servers so that it's possible to make
clean URLs, and exactly what they are.
| | 09:07 | Update notifications; I recommend
that you leave on. This is something that
| | 09:11 | lets Drupal check the drupal.org
website and server to make sure that you have
| | 09:15 | the latest versions of every thing,
that's one way that you can keep your
| | 09:18 | Drupal installations secure.
Click Save and continue.
| | 09:22 | If you didn't enter an E-mail
address in the mail server when you first
| | 09:25 | installed WAMPServer, you will see
this warning. But don't worry, we can fix
| | 09:30 | that later.
| | 09:31 | Finally, click on your new site and
you will see your Drupal site up and
| | 09:35 | running. You are now ready to
configure it and start creating your new Drupal
| | 09:39 | site.
| | Collapse this transcript |
| Installing MAMP| 00:00 | If you plan to run Drupal on a computer
with Mac OS X, and you aren't already a
| | 00:04 | whiz at managing Apache, MySQL, and PHP
on your computer, then this video is for you.
| | 00:09 | If you will be running Drupal only
on Microsoft Windows computers, go to
| | 00:13 | the other video in this
series, Installing WAMP, instead.
| | 00:17 | By the time we are done, your computer
will have all the components you need to
| | 00:20 | run a basic installation of Drupal.
| | 00:23 | The first place that we need to go is
to this website, which is at mamp.info.
| | 00:28 | Once there, you will see that there are
two versions of MAMP available; the one
| | 00:32 | on the left is MAMP PRO, which is a for
pay system, which has some pieces that
| | 00:36 | we really don't need. We are good
enough with the ordinary MAMP. You can read
| | 00:39 | more about it by clicking on this
button here, or you can just go to the
| | 00:44 | Download page by clicking here.
| | 00:46 | Once there, the latest version will be
listed here and you can click on it to
| | 00:49 | download. We have already downloaded it,
so I am going to switch to the Finder,
| | 00:54 | hide everything else, and unpack this file.
| | 00:58 | On the Mac what you would do to unpack
it is to double click, look through the
| | 01:03 | License Agreement, and if you agree,
which I assume you will, you click Agree,
| | 01:09 | and the result is a disk image, which
contains both MAMP and MAMP PRO. Again,
| | 01:14 | we only need MAMP, so you will drag
that into your Applications folder right
| | 01:18 | there.
| | 01:22 | The Copy will take a few seconds, and
when its done you can see MAMP by double
| | 01:25 | clicking on this alias to your
Applications folder, like so. You can then close
| | 01:30 | this window, and if you like, you can
eject this disk image by dragging it down
| | 01:34 | to the Eject.
| | 01:35 | Once you in the Applications folder,
scroll down until you see MAMP, and open
| | 01:40 | it by double clicking on it.
| | 01:42 | The first time you download MAMP, it
will ask you if it's okay to open it since
| | 01:45 | it was downloaded from the Internet.
Since we trust our source, we are going to
| | 01:48 | say Open.
| | 01:51 | Two things will happen. First, the
MAMP program itself will open, and second,
| | 01:55 | it will open the start page. I am
going to switch back to the MAMP program so
| | 01:59 | we can take a closer look.
| | 02:02 | In the left hand part of the screen,
you see Apache Server and MySQL server;
| | 02:06 | you can Start and Stop these servers
at any time by clicking on this button.
| | 02:12 | When the servers are stopped, the
lights glow red, when they are started again,
| | 02:16 | they glow green. In order to run
Drupal, you will always have to have the
| | 02:20 | Apache Server and MySQL Server running.
| | 02:23 | The page that was launched when MAMP
started is called the Start page, and you
| | 02:26 | can launch that at any time
by clicking on this button.
| | 02:29 | From here you have many different
options, such as controlling your MySQL
| | 02:33 | database, using phpMyAdmin; we will
be doing that a lot in this series.
| | 02:38 | I am going to go back to MAMP right now,
and look at the Preferences. We are
| | 02:42 | going to change a few things in here.
First of all, we want to change the
| | 02:46 | folder that Apache is looking for its
document root directory. The reason for
| | 02:50 | that is right now it's stored inside
the Applications folder. The problem with
| | 02:56 | having your document root directory in
your Applications folder is that many
| | 02:59 | backup systems don't look there.
Instead they look in your Documents
| | 03:02 | directories. So we are going to put ours there.
| | 03:05 | The first thing we want to do is create
that document root, and we will do that
| | 03:08 | by going back to the Finder, by
clicking on it, go up to Finder, and Hide
| | 03:12 | Others. Now I am going to go into
my directory, which in this case is
| | 03:18 | Users/tomgeller, and Sites. In here, I
am going to create a new Folder, which I
| | 03:23 | will call Drupal; this is where
all of our Drupal files will live.
| | 03:27 | I am now going to switch back to the
MAMP application and change the document
| | 03:33 | root so that it goes to that
place. Again, that was Macintosh
| | 03:38 | HD/Users/tomgeller/Sites/drupal, and
then Open, and that chooses the correct folder.
| | 03:46 | There is one other thing that we are
going to do, which is to change the Ports
| | 03:49 | that MAMP uses. Right now it uses
these nonstandard Ports, 8888 and 8889. The
| | 03:55 | reason we want to change this is, if we
don't, whenever you look at the page in
| | 03:59 | your Drupal site, it's going to have
not only the name of local host, which is
| | 04:03 | your local computer, but it will say
local host:8888, which is a little bit
| | 04:07 | inconvenient if you are typing out URLs.
| | 04:09 | So I am going to Set to default Apache
and MySQL ports, like so, and then click
| | 04:14 | on OK. The servers will restart, and
it will ask you for your Password. There
| | 04:23 | we go. We now have MAMP running on
the ports we want, and pointing to the
| | 04:27 | correct folder.
| | 04:28 | I am going to just say Open start
page again to make sure it's working, and
| | 04:32 | there we go.
| | Collapse this transcript |
| Setting up the database on a Mac| 00:00 | Drupal stores all content in a
database, which is accessed through programs
| | 00:04 | written in PHP. If all went well when
you installed WAMP or MAMP your PHP setup
| | 00:09 | won't require any configuration. The
database program however will need some
| | 00:14 | additional attention. Specifically you
need to set up a new database. There are
| | 00:18 | several ways to do so such as
through the UNIX command line and platforms
| | 00:22 | specific programs but we are going
to use the web-based program call
| | 00:25 | phpMyAdmin, which comes with MAMP and WAMP.
| | 00:29 | First, make sure that your MAMP or
WAMP installation is running as we have
| | 00:33 | here. Then, go to Open start page.
Click on phpMyAdmin and in phpMyAdmin there
| | 00:40 | is a drop-down on the left, this is
just to show you what databases are already
| | 00:44 | installed. You will see that when we
first installed it, it automatically comes
| | 00:47 | with three called information_schema,
mysql, and test. We are going to create
| | 00:51 | another one called Drupal.
| | 00:53 | We do that by going down here, type
in drupal, and we need to make no other
| | 00:57 | changes. Just click Create. Now the
database has been created and we can see
| | 01:02 | that by clicking on this drop-down
menu here. There are no tables in this
| | 01:06 | database yet because
Drupal will create those itself.
| | 01:10 | Now this was a very easy procedure for
us but I should mention that many times
| | 01:14 | this can be a very difficult thing to
do. If you are having trouble creating
| | 01:18 | your MySQL database you can get help
from the drupal.org website. But at
| | 01:22 | drupal.org, in the documentation section,
you will find this page creating the
| | 01:34 | database. This will give you
additional information if you are creating it
| | 01:38 | through some other means or if
you have trouble with phpMyAdmin.
| | 01:41 | Most important to note are the
permissions that you will need. Wrangling the
| | 01:46 | MySQL database can be one of the
hardest parts of installing and managing
| | 01:50 | Drupal. If you got through this step
okay everything else will seem easy.
| | 01:54 | Congratulations on getting through a
potentially difficult task, you are now
| | 01:58 | ready to install the Drupal package itself.
| | Collapse this transcript |
| Downloading and installing Drupal on a Mac| 00:00 | It's time to reach in and get our hands
dirty by actually installing the Drupal core.
| | 00:05 | It's a fairly simple procedure and if
you have Apache, PHP and MySQL running
| | 00:10 | already you will be able to get
started right away with building your site.
| | 00:13 | If not, other videos in this series
will show you how to get those going by
| | 00:17 | using WAMP on the Windows
platform or MAMP on the Mac.
| | 00:21 | Our demonstration will feature Drupal 6.3,
which was released in July 2008, but
| | 00:27 | the basic installation procedure was
the same in previous versions and we don't
| | 00:30 | expect it to change substantially in Drupal 7.
| | 00:33 | This video also assumes that you
have already installed the database that
| | 00:37 | you need into MySQL.
| | 00:38 | If you haven't done so already, watch
the video on installing that database.
| | 00:43 | The first place that we want to go in
order to get our Drupal installation
| | 00:47 | package is drupal.org.
| | 00:52 | The front page of drupal.org
includes links to those downloads.
| | 00:56 | Here we have 6.3 and they sometimes also
have previous versions for those people
| | 01:00 | who haven't upgraded yet.
| | 01:01 | We will go to 6.3 and say Download.
| | 01:06 | Once the file has been downloaded
to your computer, you can open it by
| | 01:10 | uncompressing the file.
| | 01:11 | On the Mac you do that by
double-clicking like so.
| | 01:14 | That creates a folder and if you look
inside, you can see all of the different
| | 01:17 | files that make up Drupal.
| | 01:19 | We are going to take all of those
files and drag them to where we have our
| | 01:22 | document root directory.
| | 01:24 | In our case that's in Macintosh HD/
Users/tomgeller/Sites, and drupal.
| | 01:30 | So we will take all of these by
hitting Command+A and dragging them in.
| | 01:35 | Then you can close this window if you like.
| | 01:37 | So we have actually just installed Drupal,
all we need to do now is configure it.
| | 01:41 | To do so go to http://localhost if you
are using a different port you will have
| | 01:48 | to add that here but we are not and
start with Install Drupal in English.
| | 01:54 | During the installation process,
you may get some warning messages.
| | 01:57 | The ones in red mean that
you can't continue further.
| | 02:00 | The ones in yellow suggest that you
should do this before you continue further.
| | 02:04 | We are going to take care
of both of these things now.
| | 02:07 | The first one said that the Drupal
installer requires that you create a certain
| | 02:10 | file as part of the installation process
and then give it certain permissions so
| | 02:14 | that Drupal can read and write to it.
| | 02:16 | That file is located at dot,
which means the Drupal root directory,
| | 02:20 | sites/default, and the
file is called settings.php.
| | 02:24 | I am going to go back to my Finder and hide
everything else so we can see what we are doing.
| | 02:29 | Then go to that location at sites/default.
| | 02:32 | Now the file itself was called settings.
php and it's created by duplicating this
| | 02:37 | default.settings.php.
| | 02:39 | So we will make that settings.php and
go back to this page and click Try Again.
| | 02:47 | Good, we got rid of that.
| | 02:48 | Now we are going to take care of the
other part, which suggests that we increase
| | 02:52 | our PHP memory limit.
| | 02:53 | I think this is a good idea because
certain modules require more memory and even
| | 02:58 | the core installation does
not do so well in 8 Megabytes.
| | 03:02 | The file that we need to change is
the Applications/MAMP/conf/php5.
| | 03:08 | Let's go there right now.
| | 03:10 | Once again I go to the Finder, Hide
Others, I am going to go to the applications
| | 03:15 | folder by clicking on
Applications to MAMP to conf and php5.
| | 03:23 | This is the file that we need to edit.
| | 03:26 | We opened it up in a Text Editor and I
am just going to search for 8M which is
| | 03:32 | the default size of the memory in php.ini,
| | 03:35 | and I am going to change that to
16 Megabytes, Save and then quit out of
| | 03:42 | the program and then you will have to
go to MAMP and restart your servers.
| | 03:53 | By restarting your servers, you
are making that change take effect.
| | 03:57 | Now let's go back to our Drupal
installation, we will reload this page and
| | 04:01 | see if that error message goes away, I do
that by hitting Command+R in most browsers.
| | 04:07 | And now we are up to just entering the
database information to tie Drupal to the database.
| | 04:13 | If you are using MySQL you
can leave this button here;
| | 04:16 | if you are using pgSQL,
you would change it here.
| | 04:19 | Our database name is
drupal, our username is root.
| | 04:23 | I enter the password and if you are
using a remote server or have some unusual
| | 04:27 | settings such as the different port,
you may have to change some Advance
| | 04:30 | options, but we are not
doing that so we will click Save.
| | 04:36 | When that's done, you are given a
page where you should enter information
| | 04:39 | about the site itself.
| | 04:40 | The first thing we will want
to do is change the site name.
| | 04:43 | Our site is going to be about how to
buy and sale real estate that's underwater
| | 04:48 | and we are going to call it Underwater Reality.
| | 04:53 | For the email address I am just
going to enter my own email address
| | 04:55 | here, tom@tomgeller.com.
| | 04:59 | Then we come to the Administrator account.
| | 05:01 | Personally I always like to use admin
but you could use whatever you like as
| | 05:06 | long as you remember the name because
this is going to be the super user that is
| | 05:09 | the one who has access to
everything in the Drupal system.
| | 05:12 | If you forget this it can be difficult
to get back into it although we will show
| | 05:16 | you how to do that in the
recovering from disasters video.
| | 05:20 | Finally the password, Drupal 6
introduces a new interesting widget, which tells
| | 05:26 | you just how strong your password is.
| | 05:28 | If you were to add additional characters
it would change to medium and then high.
| | 05:32 | For now we are just going to leave
it as it is because we are just using
| | 05:36 | a development server;
| | 05:37 | confirm the password, make sure
that the time zone is correct.
| | 05:41 | Then there are two things down at the
bottom, Clean URLs is something we will be
| | 05:45 | discussing in a separate video and we
will explain how you can change your
| | 05:49 | server so that it's possible to make
Clean URLs and exactly what they are.
| | 05:53 | Update notifications, I
recommend that you leave on.
| | 05:56 | This is something that lets Drupal
check the drupal.org website and server to
| | 06:02 | make sure that you have the latest
versions of everything that's one way that
| | 06:05 | you can keep your Drupal installation secure.
| | 06:07 | Click on Save and continue and we are
done, click on your new site and you are
| | 06:13 | actually logged into your site.
| | 06:15 | It has the name that you created up there,
you are logged in as the administrator.
| | 06:19 | And from here we are going to be going
on to customization followed by adding
| | 06:23 | functionality and finally adding content,
but at this point you have a complete
| | 06:28 | site sitting and waiting to
become whatever you want it to be.
| | Collapse this transcript |
| Troubleshooting installation problems| 00:00 | The best-laid plans of mice and men
going oft awry, especially when it comes to
| | 00:04 | software installations with lots of
dependencies. In this video, we'll show
| | 00:08 | you how to fix a few of Drupal's more
common installation issues, and show you
| | 00:12 | where you can go to get help
for anything we didn't cover here.
| | 00:16 | The first time that you might have
problems is during the installation.
| | 00:20 | Most commonly, the problem is that it can't
find the database, and here there's a
| | 00:24 | few things to check.
| | 00:26 | The first one is that you have the
correct Username and Password. The second is
| | 00:30 | in that Advanced Option section at the
bottom of the screen. Very often if you
| | 00:35 | are using a remote Internet service
provider, they will ask for you to use a
| | 00:38 | different port from the one that Drupal
is expecting, remember to click on that
| | 00:42 | turn down triangle and look at the
Advanced Options if you can't connect to the
| | 00:45 | database, and check with
your system administrator.
| | 00:48 | The second problem that often occurs
is if you can't bring up the Drupal site
| | 00:52 | in a web browser; it appears to be
running, but whenever you go to it, what you
| | 00:55 | get is a blank screen. The first
thing to check is that you actually have a
| | 01:00 | root directory, that Apache is looking towards.
| | 01:03 | One way to check that is to go into
MAMP or WAMP, if you are running Windows.
| | 01:07 | Go into Preferences, and take a look
in MAMP at the Apache tab. Then you can
| | 01:12 | Select the directory and make sure
that your Drupal files are actually in
| | 01:15 | there.
| | 01:18 | Let's say that you have taken your
site offline and are no longer able to get
| | 01:21 | back into the administration pages. Well,
there is a trick that advanced users
| | 01:25 | of Drupal know how to do, by putting
the URL in its most basic form for the
| | 01:30 | administration page. That would be ?q=
admin, which will bring you directly to
| | 01:39 | the administration page, even if your
site is offline. You maybe asked to log
| | 01:43 | in at that point, but at least you
will be able to get into your site.
| | 01:46 | Let's say for some reason your
administration goes wrong; some files are
| | 01:50 | missing or something like that. There
are a few special URLs you could use to
| | 01:55 | get Drupal working again. The first
one is simply your address, which in this
| | 01:59 | case is localhost/install.php. What
that does is it calls the specific file in
| | 02:05 | Drupal's hierarchy that lets you
install the program; we are going to do that
| | 02:08 | now. It tells us that it's already
installed. If it were having some problems,
| | 02:13 | then it would give you some
instructions on what you should do.
| | 02:16 | Another useful file is update.php,
which is very useful if you added some new
| | 02:22 | modules, or let's say you have changed
versions of the Drupal core. Here we did
| | 02:27 | it, and we can see it gives us
some options here, including a link to
| | 02:32 | additional help on the drupal.org website.
| | 02:34 | Let's click on that, and it will give
you all sorts of information, for not
| | 02:38 | only Drupal 6, but for previous
versions of Drupal as well. In fact, the
| | 02:42 | drupal.org website is where you should
go if you have a problem that you can't
| | 02:46 | answer.
| | 02:47 | Let's say that you can get into the
site, but you seem to be having other
| | 02:50 | problems and want to find out where
they are coming from. The Administration
| | 02:54 | section has several links that will
help you. The most useful of these is the
| | 02:58 | Status report. This will tell you
if there are any problems with your
| | 03:01 | installation, as well as telling you
what version of Drupal you are running,
| | 03:05 | and what some of the other
aspects of your Drupal installation are.
| | 03:08 | Here for example, we can see that we
haven't checked to see that we have the
| | 03:11 | latest version of Drupal. It gives us
some links that will allow us to do that.
| | 03:15 | We do it, and everything is back up to date.
| | 03:20 | Finally, we should mention that
installation problems are sometimes the result
| | 03:24 | of issues in the computer's
Operating System or even in its hardware.
| | 03:28 | Obviously, we can't cover all of those
here. Most often the problems that will
| | 03:32 | affect Drupal directly are in Apache
or the MySQL configuration, but errors
| | 03:36 | elsewhere, such as the file system
could prevent Drupal from operating. Your
| | 03:41 | best bet is to read any system
errors you get, copy those errors into an
| | 03:44 | Internet Search Engine, and see
how others have solved the problem.
| | Collapse this transcript |
| Automating updates with cron| 00:00 | During the installation process or
while poking around Drupal's administration
| | 00:04 | pages on your own, you might have
noticed something like 'cron has not run' or
| | 00:08 | 'To check for updates you may need to run
cron,' or you might have installed the
| | 00:12 | module that fetches information
periodically from the Internet such as the news
| | 00:16 | aggregator but then find that it's not
working. That's because Drupal has to
| | 00:20 | run certain system level processes
periodically but requires an outside program
| | 00:25 | to do so with the permissions required.
That program is called cron, and we'll
| | 00:29 | show you how to configure it to make
Drupal happy. We will also tell you
| | 00:33 | about a handy Drupal module called
poormanscron which we will learn to install
| | 00:37 | later in the course.
| | 00:39 | Essentially your goal is to force a
visit to a certain Drupal page once in a
| | 00:44 | while. That page is cron.php, which
is spelled cron.php, and the file is
| | 00:51 | located at the top of your Drupal
directory. So by typing in your side address,
| | 00:56 | in our case that's localhost followed
by cron.php. We can visit that page;
| | 01:03 | let's do that now. Looks like
nothing happened, doesn't it?
| | 01:06 | Well let's go back to our Drupal site
and take a look at our administration
| | 01:12 | pages and then go down to the Status
report and we will see something here,
| | 01:18 | cron maintenance tasks, Last run 12
sec ago. That was when we visited the
| | 01:22 | cron.php page. So even though it
doesn't have any interface back to us, it is
| | 01:27 | doing something and what cron does
maybe very important to your Drupal site.
| | 01:32 | Your goal is to make that process
happen occasionally and automatically. cron
| | 01:36 | is your tool. For Drupal users, the
number one place for instructions on how to
| | 01:40 | use cron is drupal.org/cron. There you
will see all sorts of information about
| | 01:47 | how to configure cron. There are
essentially three ways to make cron run. The
| | 01:53 | three ways to run cron are first by
running it on your computer that is to say
| | 01:59 | on the server. Secondly by using an
outside cron helper such as webcron.org and
| | 02:05 | third by using the module we mentioned
earlier which is called poormanscron. We
| | 02:10 | will show you once again how to install
that module in another video in the series.
| | 02:14 | We will show you how to edit the
cron in UNIX, for Windows users the task
| | 02:20 | scheduler function is a good
replacement for cron. A good explanation of how to
| | 02:24 | use this function can be found at the
drupal.org website. Follow the URL below
| | 02:28 | for more information.
| | 02:30 | In order to edit at UNIX, on the Mac
you will have to go into a Terminal
| | 02:34 | program, if you are using a Remote
Server, you may have to use a Shell program.
| | 02:40 | On the Mac we double-click on the
Terminal program and from here we can enter
| | 02:45 | commands as we like. The first thing
that we need to do is find the program
| | 02:49 | that's going to visit the cron page.
In other words a text-based web browser.
| | 02:53 | The two big ones are called lynx and
wget and there is also a curl. We will try
| | 02:59 | finding each of these. In UNIX, you can
do so by saying, whereis lynx. We don't
| | 03:06 | seem to have that. So let's try whereis
wget. Finally whereis curl. Aha! We do
| | 03:14 | have curl. We take a note of that
location which in this case is usr/bin/curl.
| | 03:21 | Now that we know how we will visit
that cron.php page on your Drupal site, we
| | 03:25 | need to make it happen periodically.
| | 03:28 | cron is unusual, it relies on the
precise configuration of a text file that you
| | 03:32 | can't edit directly, and it's an
obscure and obfuscated format. In UNIX you can
| | 03:37 | figure cron through a command line
interface which is called crontab. The way
| | 03:42 | that we do that is by typing crontab-e
which means edit and there it is. Right
| | 03:50 | now our crontab is empty. I am going
to tell you the exact keys to enter
| | 03:55 | because we are now in a program called
vi, you maybe using a different sort of
| | 03:59 | editor on your server. Depending on
which web browser you found whether it's
| | 04:03 | lynx or wget or curl, you can find
instructions on how to set up your crontab
| | 04:09 | in the scripts folder which is
inside your Drupal installation.
| | 04:13 | So I am going to go there right now.
Inside here you will find some sample
| | 04:24 | scripts since the one that we found
was called curl, I am going to open that
| | 04:28 | up. So here we have opened up the
sample curl command then I am going to go
| | 04:32 | back to my Terminal and enter that
command. It's curl --silent --compressed and
| | 04:43 | then we need to put in the address
of the server, in this case instead of
| | 04:46 | example.com, we say http://localhost/cron.php.
| | 04:54 | Now our job is not completely finished
because although we have given the command
| | 04:58 | we haven't yet set how frequently or
when we want that command to be run.
| | 05:02 | For that once again we can go back to the
page on drupal.org, Configuring cron jobs,
| | 05:08 | and it will give you a
sense of how crontabs are setup.
| | 05:12 | The way that it works is that there
are five fields at the beginning, which
| | 05:15 | stand for minutes, hours, days of the
month, months of the year and then day of
| | 05:20 | the week. We don't have to worry about
any of those last four because we are
| | 05:24 | going to want our cron to
run at least once an hour.
| | 05:27 | So in this first field we will say at
which point after the hour we want it to
| | 05:32 | run. In this example that's given on
drupal.org, it runs at 45 minutes after
| | 05:38 | the hour. Let's go back to our example
and make it happen also at 45 minutes
| | 05:42 | after the hour.
| | 05:45 | So 45 ****, you can also make it run
much more frequently than that, for
| | 05:52 | example every minute if you were to
replace the 45 with 0-59. For other
| | 05:59 | information about the various kinds of
ways you can control cron, look on the
| | 06:03 | cron page on the drupal.org website.
| | 06:06 | The second thing that we need to do
is we have to tell our computer where
| | 06:10 | exactly we are going to find that cron
program. Now, you might remember that we
| | 06:14 | had usr/bin/curl, well we
enter that here /usr/bin/curl.
| | 06:19 | So now we have entered when we want
cron to run, what program we want it to
| | 06:29 | run, what sort of options we want it to
run with and again this was just copied
| | 06:33 | from the text that's in that scripts
folder and exactly where we want it to
| | 06:38 | run. In order to get out of that we
will hit Escape on our keyboard, then :wq
| | 06:44 | if you are using VI. Again, if you are
using a different editor you will use
| | 06:47 | whatever commands you used to
get out of that and hit Return.
| | 06:51 | Now we are told that we have installed
the new crontab, and we are ready to go.
| | 06:55 | Now we have installed cron, so our
Drupal website will be updated at least once
| | 07:01 | an hour, in our case it will
happen at 45 minutes after each hour.
| | 07:06 | It's unfortunate that something so
critical to Drupal's operation is so hard to
| | 07:10 | configure but the good news is you
have one other option. If you go to
| | 07:16 | webcron.org, this is an outside service
that would let you set up a cron system
| | 07:23 | on your Drupal site from an outside
place. This is somewhat complex to set up
| | 07:28 | as well and we won't go into all the
details. If you are like me, speak English
| | 07:32 | as your first language, the first
thing you will want to do is click on the
| | 07:35 | British flag down here and
then follow the instructions.
| | 07:39 | The good news is once you have cron
setup whether it's through webcron.org,
| | 07:43 | poormanscron or the command line
interface I gave you before; you pretty much
| | 07:48 | never have to touch it again. Good luck!
| | Collapse this transcript |
|
|
4. Perfecting Your InstallationSetting up clean URLs| 00:00 | We are at a point here where Drupal is
now installed and ready to go. At this
| | 00:04 | point, you could simply start adding
your content. You have a fully working
| | 00:08 | Drupal website. But there is one little
tweak I would like to recommend before
| | 00:11 | going any further. While it's optional,
it makes your site more friendly to
| | 00:15 | both search engines and users.
That is configuration for Clean URLs.
| | 00:21 | This section can be somewhat
difficult and technical and much of the
| | 00:24 | information that you are going to
need will be on the drupal.org website.
| | 00:27 | I'll show you how to find that information,
but I will also show you how to go
| | 00:30 | through the process in one certain way.
You might not be able to do this on
| | 00:35 | your computer, but with any
luck it will work just fine.
| | 00:38 | When you first installed Drupal, you
might have noticed those choices you had,
| | 00:42 | to either use Clean URLs or not. If
you can click those radio buttons at that
| | 00:47 | point then you should turn them on,
there is no reason not to. However, for
| | 00:51 | most of us we weren't able to do that
because there wasn't something on our
| | 00:54 | server that needed to be changed.
I'll show you how to change that now.
| | 00:58 | You can also find out whether you can
use Clean URLs once the site is already
| | 01:02 | loaded. To do so go to Administer and
scroll down until you find Clean URLs, I
| | 01:08 | will click on there, oh it look likes I
can't because I can't click those radio
| | 01:12 | buttons. That's okay; I
will show you how to do it.
| | 01:16 | The first place to go is the drupal.org
website, I will create a new window and
| | 01:20 | go to drupal.org. To find the
page that you want you will click on
| | 01:24 | Documentation and then scroll down to
Beyond the Basics. Then go to HowTos and
| | 01:32 | finally to the Installation,
Migration and Backup section.
| | 01:36 | Once there, the second choice is
Clean URLs. We will be coming back to this
| | 01:42 | page frequently as there is a lot of
information on it that we need. However,
| | 01:45 | first I will show you where the file
is that you will need to change in order
| | 01:49 | to make Clean URLs work. I will show
where it is on the Mac computer, although
| | 01:53 | if you are on a PC, it will be in a
different place, but it will have the same name.
| | 01:57 | We will go to the Finder and hide
everything else so we can see what we are
| | 02:00 | doing. Create a new window by
hitting Command+N on the Mac and go to the
| | 02:05 | Applications and then to our MAMP
installation folder. In the MAMP installation
| | 02:10 | folder we go to conf, apache and there
it is httpd conf. If you are on the PC
| | 02:17 | again, you will have to search for
that depending on how you did your
| | 02:19 | installation.
| | 02:20 | I am going to make a backup of that
by hitting Command+C, copy and then
| | 02:25 | Command+V for paste, again on the PC
it's Ctrl+C and Ctrl+V. Remember that we
| | 02:31 | have this copy in case anything goes
wrong. We are going to open the original
| | 02:35 | file, which is called httpd.conf. Once
we have it open, we can make the window
| | 02:41 | a little bit larger, so we
can see what we are doing.
| | 02:43 | We are going to look for something
called mod_rewrite, I will do Command+F or
| | 02:47 | Ctrl+F on the PC mod_rewrite. Good, we
need to have this line uncommented. In
| | 02:57 | some httpd conf files, you will find a
# sign in front of it which means that
| | 03:04 | it's turned off, you want to make sure
that it's turned on by backspacing a few
| | 03:08 | times and taking away that # sign.
| | 03:11 | You can also find out if the mod_
rewrite module is turned on in Apache, by
| | 03:16 | going back to MAMP or WAMP, opening up
your start page and hitting phpinfo and
| | 03:21 | then doing a search for
rewrite there. There we are.
| | 03:25 | We actually have mod_rewrite already
turned on, if it isn't turned on in your
| | 03:29 | installation, the place to go again
is the Drupal page I mentioned earlier
| | 03:35 | which will tell you a little bit
about how to turn it on. So we have
| | 03:38 | mod_rewrite turned on, why can't we
use Clean URLs. It turns out that some
| | 03:43 | additional changes have to be made to
httpd.conf or to another file. I am going
| | 03:50 | to make them to httpd.conf although
again, there are few different ways of
| | 03:54 | doing this and you can find
out on the drupal.org web page.
| | 03:58 | My favorite way though, is if you
scroll down, you will find a little snippet
| | 04:02 | of text here, you can copy, Command+C
or Ctrl+C and then go back to that file
| | 04:09 | and paste it pretty much anywhere in
the file. I like to put it anywhere in the
| | 04:12 | file. I will like to put it somewhere
around the LoadModule part. I will paste
| | 04:15 | it. Then one other change has to happen
which is you have to change the path to
| | 04:19 | your Drupal directory. For us that's
Users/tomgeller/Sites/drupal. We save that
| | 04:28 | file with Command+S or Ctrl+S. Then
we have to do one more thing go to MAMP
| | 04:34 | stop the servers. We need to enter
our password for that, start the servers
| | 04:43 | again and then let's see if it works.
| | 04:46 | We will go back to our site, reload
this page, and hurray! We can now use Clean
| | 04:55 | URLs. I will show you what Clean URLs
actually does, by turning it on and then
| | 05:00 | saying Save Configuration. First you
will notice how we have this ?q= blah,
| | 05:05 | blah, blah, blah. Save
configuration, it's all gone.
| | 05:10 | Now we just have /admin/etcetera.
That's true throughout the entire site. If we
| | 05:16 | go to, let's say Administer instead of
saying ?q= blah, blah, blah it just says
| | 05:21 | admin.
| | 05:23 | It can be very difficult to set up
Clean URLs and believe me I feel for you. I
| | 05:27 | have done this many times and had many
problems doing it. Unfortunately, we can
| | 05:32 | only show one path to troubleshooting
this, since there are many different ways
| | 05:36 | that it can go wrong. But it's well
worth setting up Clean URLs as you can see.
| | 05:40 | If you need any more help, cash in
your, you owe me a favor chip with the
| | 05:44 | system administrator friend you have
down the street or once again go back to
| | 05:48 | drupal.org and get help there.
| | Collapse this transcript |
| Backing up your Drupal site| 00:00 | Once you have a Drupal site that you
like, you'll want a quick and easy way to
| | 00:03 | back it up for safekeeping or to save
a copy to migrate to another server.
| | 00:08 | Fortunately, the process is fairly
painless, thanks to the MySQL utility,
| | 00:12 | phpMyAdmin. But first, we're going to
have to save the files that are in the
| | 00:17 | Drupal directory. Drupal stores
information in two ways, first as those files
| | 00:23 | and second as the information in the
MySQL database. First, we go up to where
| | 00:29 | we have our Drupal directory, in our
case it's in Users/tomgeller/Sites/drupal.
| | 00:35 | Backing this up is amazingly easy, just
Command+C or Ctrl+C. Go to wherever you
| | 00:40 | want to back it up, Command+V or Ctrl+V
on a PC. And there we are, we've made a
| | 00:45 | copy of the entire directory. These
files can also be backed up using a
| | 00:49 | standard backup program such as Time
Machine or Intego Personal Backup on the
| | 00:53 | Mac, or as part of your regular
computer backup discipline. If your files are
| | 00:57 | on a server, you'll have to use an
FTP program. In truth, you don't have to
| | 01:02 | back up the entire Drupal directory,
and if in fact you've built a Drupal site
| | 01:06 | that has a lot of large movie files or
large graphics. You might decide to only
| | 01:11 | backup certain sub folders, inside
there where things change frequently.
| | 01:15 | But the default Drupal installation
is extremely small; it's about five
| | 01:18 | megabytes. So unless you start adding
large files, there is no reason not to
| | 01:22 | back-up the entire folder. Once you
have the folder, I would suggest renaming
| | 01:26 | it with the date of the backup and
possibly any other information that you want
| | 01:30 | to add. For example, I am going to say
20080714 and this is Underwater Realty.
| | 01:38 | And I am just going to call it
underwater-drupal. Good. That will be the name
| | 01:41 | of our backup. I am going to give a
similar backup name, to the MySQL file,
| | 01:46 | which we are going to back up now. To
get there, go up to MAMP or to WAMP if
| | 01:50 | you are running Windows and click on
OPEN Start Page or the similar button
| | 01:54 | that's on the WAMP Administration Interface.
| | 01:58 | Then go to phpMyAdmin and scroll down,
until you get to Export. We are going to
| | 02:04 | export the entire database. Once again,
you don't really need to export the
| | 02:08 | whole database if you are a very
good MySQL administrator. You could just
| | 02:12 | export individual tables, but why not
do the whole thing. It will make a lot
| | 02:16 | easier when it's time to restore.
Click on Drupal, go down here. You have a
| | 02:23 | choice of either just saying Go,
which will bring up the SQL commands in a
| | 02:28 | plain text file, which you can copy
somewhere and put somewhere or more easy is
| | 02:32 | to say, Save as File. We'll do that,
say Go, once it's downloaded, you can go
| | 02:37 | back to where it has downloaded, in
this case to the desktop, and give it the
| | 02:44 | name that you want.
| | 02:45 | Again, since I use this name for the
files themselves, I'll give a similar name
| | 02:50 | to the SQL file. One last step as a
good idea, when you have all of these files
| | 02:59 | in a folder I would suggest one more
step. Instead of leaving all of these
| | 03:04 | files in a folder, I would compress it
using whatever compression utility is on
| | 03:07 | your computer. On the Mac, you can do
that by holding down the Control key,
| | 03:11 | clicking on the folder, and saying Compress.
| | 03:14 | On the PC, you would right click and
issue a similar command, and there you
| | 03:19 | have it. You now have two individual
files that you can use to restore your
| | 03:23 | Drupal installation back to
the point where you backed it up.
| | 03:26 | We'll show you how to do that
restore in another video in this series.
| | Collapse this transcript |
| Restoring your Drupal site from backup| 00:00 | In another video, we showed you how to
backup your Drupal site in two steps.
| | 00:04 | First, by copying all the files in your
Drupal folder, and secondly by backing
| | 00:08 | up the database. For a backup doesn't
do you any good if you can't restore from
| | 00:12 | it. So we will show you
how to do that in this video.
| | 00:15 | You should create a backup of your site
first, by following the instructions in
| | 00:19 | that earlier video, since we will be
using them here. To get started we are
| | 00:24 | going to do something dramatic. We are
going to go into our Drupal folder, and
| | 00:28 | delete everything there. We go into the
Macintosh HD, and Users, and tomgeller,
| | 00:34 | this is where we happen to have our
Drupal site, but of course, yours might be
| | 00:37 | somewhere else on your computer.
| | 00:40 | Go into sites, Drupal, and I am just
going to let's say, get rid of some random
| | 00:45 | files here. And they are gone. Now
let's go back into our site, and see how
| | 00:52 | well it faired. We go to http://
localhost, and we can't see -- you know, we can
| | 00:59 | see the individual files that are
left, but we don't see our Drupal site
| | 01:02 | obviously. So let's go back to the
Finder, hide everything, and restore from
| | 01:08 | the file that we had saved.
| | 01:09 | Fortunately I still have those files
from when we had exported our database and
| | 01:13 | saved the files earlier, here on
our desktop. I am going to get rid of
| | 01:17 | everything that's in our Drupal folder.
My personal preference is to just get a
| | 01:21 | clean slate and then start again from
the beginning. That also means of course,
| | 01:25 | that when you backup, you have to
save everything from your Drupal folder.
| | 01:29 | If you decide to only save certain
folders, and certain files inside the Drupal
| | 01:33 | folder, of course, your procedure will
be somewhat different. But for us I am
| | 01:37 | going to say Command +A or Ctrl+A if
you are using a PC, drag it to the trash,
| | 01:42 | and empty it, and it's gone. We had
saved our files into a Drupal folder which
| | 01:49 | we then compressed. I am going to
uncompress that now, and to restore the
| | 01:53 | files, all that we have to do, is
take everything there, again Command+A or
| | 01:58 | Ctrl+A, drag it back in, and puff.
I'll reload this page, and it works again.
| | 02:07 | What if something happens that
destroys your SQL database? I am going to go
| | 02:11 | into phpMyAdmin, and do exactly that.
To do that in MAMP or WAMP, we go to our
| | 02:16 | start page in phpMyAdmin. Go into our
Drupal database, and let's just delete a
| | 02:23 | few random tables here. And we selected,
we just say, drop. Yes, I really do
| | 02:33 | want to do that, I really
do want to do it on my site.
| | 02:35 | I'll create a new Window, and take a
look and see whether our site is actually
| | 02:38 | running, as a result. Now we have too
many errors here. So we are going to do
| | 02:42 | something very similar in the MySQL
database that we did in the files. I am
| | 02:48 | going to go into this database and
just get rid of the entire thing.
| | 02:51 | Fortunately remember, we did make a
backup, don't do this obviously if you
| | 02:56 | didn't make a backup. I do want to drop
it, I will say, OK. Now, I am going to
| | 03:01 | go back to the Finder, find where that
SQL database is, it's right here on our
| | 03:08 | desktop. Go back in here, and now instead
of using export, we are going to use import.
| | 03:15 | From here we can choose the file that
we want to backup from, by clicking on
| | 03:19 | Choose File, and there is my drupal.sql
file, Choose, and then just scroll down
| | 03:25 | to the bottom, and say Go. If
everything goes well, you will get a message like
| | 03:30 | this. If it doesn't, you'll see a
red box appear, and it will explain the
| | 03:34 | errors. In that case, you may have some
troubleshooting to do. I would suggest
| | 03:39 | the first thing you do, is try once
again dropping the database, and try
| | 03:42 | re-importing it. But let's take
another look at our site, and see if it
| | 03:45 | actually works. We just go to localhost,
and we are back, our site is actually
| | 03:51 | working. We can administer it, we can
see all of our content, and everything is fine.
| | 03:57 | You now know how to backup and restore
your Drupal site, which will save you a
| | 04:01 | lot of problems. The last step in
this process is the one where most people
| | 04:05 | trip up, which is the actually make
those backups on a regular basis. I would
| | 04:10 | suggest if you have a busy site, at
least once a week, they don't take up very
| | 04:14 | much space, and the trouble
that you save is enormous.
| | Collapse this transcript |
| Wiping your Drupal installation clean| 00:00 | It's easy to get Drupal off your
computer for any reason. For example, if your
| | 00:04 | Drupal installation sensitive data
that you need to destroy. You just need to
| | 00:09 | remove data in two places, the Drupal
file system and Drupal's database. First
| | 00:15 | the file system, that's easy enough
to get rid of. Since all the files that
| | 00:19 | Drupal uses are contained within the
Drupal folder itself. Just move that or
| | 00:23 | throw it away and it's gone. I'll show
you how to do that on our installation.
| | 00:27 | First, we go to the finder and hide
everything else and here we see the Drupal
| | 00:32 | folder, inside it or all of its files.
| | 00:35 | To get rid of it on Mac, we'll just
grab it and drag it to the Trash. And on a
| | 00:40 | Windows machine, we would highlight it,
right click, and select Delete. Then
| | 00:45 | when we empty the Trash, it's gone.
However, the database's content is actually
| | 00:50 | still on the computer in a separate
database file. For complete security,
| | 00:55 | you'll need to get rid of that. In SQL
jargon to delete a database, you drop
| | 00:59 | it. We'll do so through phpMyAdmin. To
get to phpMyAdmin you switch to MAMP or
| | 01:06 | if you are on Windows, WAMP. You then
click Open Start Page and click on the
| | 01:13 | phpMyAdmin link; from there, go to
Databases and select the database you use
| | 01:19 | for Drupal.
| | 01:20 | Ours is named Drupal; then just click
on Drop and you'll get a warning because
| | 01:25 | remember you are going to destroy all
of the data in that database. That's what
| | 01:30 | we want to do, so we'll click OK. Now
your Drupal site is completely gone. If
| | 01:36 | you want to remove all traces of it
from ever having been on your computer, you
| | 01:39 | would also need to undo changes you
made in the file system in order to make
| | 01:42 | Drupal run the way you want it.
| | 01:44 | For example, you might have needed to
change some of Apache's files, in order
| | 01:48 | to make clean URL's work. But honestly
leaving in such changes generally won't
| | 01:53 | cause problems for others or give away
any secret content. The password to your
| | 01:58 | database was stored in the Drupal
folder, so it's already gone. As is the
| | 02:02 | database and all of your site's content itself.
| | Collapse this transcript |
| Updating Drupal| 00:00 | Drupal Version 6 introduces some
convenient features that allow it to
| | 00:03 | essentially monitor itself to make
sure the most up-to-date core program and
| | 00:07 | modules are installed. We'll show you a
typical update from version 6.2 to 6.3.
| | 00:13 | We'll also show you how to update a
module. However, we are not including any
| | 00:17 | exercise files for this video, as the
older version isn't as secure as the new
| | 00:22 | one. So it would be a bad idea for you
to install it on your own computer. By
| | 00:26 | the way, all instructions for updating
the core Drupal system are contained in
| | 00:30 | a file in Drupal's word
directory, entitled upgrade.txt.
| | 00:35 | This video is largely based on that
text from Drupal Version 6.3. As you've no
| | 00:41 | doubt noticed, Drupal often reminds
you to check for new updates, especially,
| | 00:45 | whenever you install or remove modules.
Sometimes, you'll see a different kind
| | 00:49 | of message. As you'll see when I click
on Administer; it's this red box that
| | 00:54 | tells you one or more problems were
detected with your Drupal installation.
| | 00:57 | Fortunately, it tells you what to do.
You click on the status report link, and
| | 01:03 | you can see that there are two problems.
One problem is that the Drupal core is
| | 01:07 | not up-to-date. It tells us there is
a new version available - version 6.3,
| | 01:11 | whereas we're running 6.2.
| | 01:14 | The other thing it tells us is that
one of our modules is out of date. We'll
| | 01:17 | come back to that in a minute. Before
we do anything else we want to back up
| | 01:21 | our site. To do so, we go back to the
installation directory, where we first
| | 01:26 | put Drupal. I am going to do that by
going to the Finder and hiding everything
| | 01:29 | else and then going up one level.
On the Mac you do that by going Go to
| | 01:35 | Enclosing Folder, whereas on the pc,
you simply click on the Enclosing Folder
| | 01:39 | icon. Once there, I am going to copy
this Drupal folder; I do that on the Mac
| | 01:44 | with Command+C, or on the PC, with
Ctrl+C, and then bring it over somewhere
| | 01:50 | else. I am going to put it on to the
desktop and hit Command+V or Ctrl+V on a
| | 01:54 | Windows machine and I'll
rename it, drupal-old-backup.
| | 02:02 | Now, I'll reopen my drupal folder and
go back to the administrative interface.
| | 02:07 | The first thing you should do is to
take the site off-line. To do that, go to
| | 02:12 | Administer and scroll down until you
see Site Maintenance. Click on that link;
| | 02:19 | the text in the box here is what
ordinary users will see when the site is
| | 02:23 | off-line, you as the administrator
will still be able to get around the
| | 02:26 | administrative pages, but nobody else
will be able to get into the site, so be
| | 02:30 | sure to do this during the low
traffic time. You can change this text, but
| | 02:34 | we're going to leave it as it is.
Then you click on Off-line and Save
| | 02:39 | configuration. What the ordinary user
sees when they try to access the site
| | 02:43 | now, looks something like this.
| | 02:49 | We'll now return to the
administrative interface. There are two additional
| | 02:53 | things that you need to do - first, is
to turn off any contributed modules. To
| | 02:58 | do that, go to Administer and Modules
and scroll down. There are two groups on
| | 03:06 | this page - one is Core-optional, and
one is Core-required. No modules in those
| | 03:12 | folders need to be turned off; however,
everything else should be. For example,
| | 03:17 | at the top of this page we have CCK
Content. We'll turn that off, continue
| | 03:22 | scrolling down. Nope, nothing in Core
-optional needs to be turned off and
| | 03:27 | nothing in Core-required, so
we click on Save Configuration.
| | 03:32 | Finally, turn off any contributed
theme that you are using. To do that, click
| | 03:37 | on Administer and Themes. We are
running one of the original themes that came
| | 03:42 | downloaded with Drupal, so we don't
have to do this step. If you are using a
| | 03:46 | different theme however, change it to
one of Drupal's default themes that would
| | 03:51 | be either Garland, or Bluemarine, or
anything else that came with Drupal. To do
| | 03:56 | so, click in the button underneath
Default, then go to the bottom and say Save
| | 04:01 | configuration. Since we've made some
changes to the Theme and Modules, we can
| | 04:05 | check again to see if there are any
updates; but, of course, we already know
| | 04:09 | that there are. We'll go to the
Available updates page. Now, we download the
| | 04:14 | new version of Drupal by clicking on
the Download link. You can close this
| | 04:20 | window when you are done.
| | 04:22 | We go to wherever it was downloaded.
In our case, that's the desktop, so I
| | 04:26 | click on the Finder and hide everything
else. We then unpack the file that was
| | 04:31 | downloaded by double clicking on it.
That creates a folder. Now remember we
| | 04:36 | have a backup of everything that was in
our Drupal folder, so we can throw this
| | 04:40 | all away. We will be replacing some
files in the new installation with things
| | 04:44 | from the old backup, but we'll show you
how to do that when the time comes. To
| | 04:49 | select everything, hit Command+A on the
Mac or Ctrl+A on a Windows machine. And
| | 04:53 | then on a Mac, you would drag it to
the Trash, or on a Windows machine you'd
| | 04:59 | right click and select Delete.
| | 05:01 | Now, we take everything in that newly
downloaded folder. Select everything
| | 05:06 | again with Command+A or Ctrl+A and
drag it back into your Drupal installation
| | 05:10 | folder. You can then close this
window since it is empty. There is one more
| | 05:15 | thing to do. This Sites folder
contains most everything that makes your site,
| | 05:21 | particularly yours. Some Drupal
installations also have a folder called Files
| | 05:25 | at this top level. If you do, you
should also pay attention to that one. We are
| | 05:30 | going to replace this Sites folder
with what was in our old Drupal backup. To
| | 05:34 | do so, throw away this one and put in
the one that was in the old backup. We do
| | 05:43 | so, by copying it Command+C or Ctrl+C
on the windows machine. Go into your
| | 05:48 | other window where your actual Drupal
installation is and Command+V or Ctrl+V
| | 05:53 | on a Windows machine. There, we
can close extraneous windows now.
| | 05:59 | So now, we have a Drupal installation
that contains the new version and we
| | 06:03 | still have a complete old backup
over here. Now, we go back to our
| | 06:07 | administrative interface. We run this
special page by deleting everything after
| | 06:11 | the domain name and typing in update.
php. Now, it tells us a little bit of
| | 06:18 | information, which we've already gone
over in this video. Click on Continue.
| | 06:24 | You can take a look at Select versions.
Although since we have already moved
| | 06:27 | the files over, we don't have to
actually put anything in here and click Update.
| | 06:33 | Now, you can go back to your
administration pages. Let's make sure that we are
| | 06:38 | running the new version by going to
Reports, and Status Report. As you can see
| | 06:45 | we are running Drupal 6.3, if you want
to check to make sure that everything is
| | 06:49 | up to date, I would recommend that you
run the cron job, by clicking on this
| | 06:53 | link here, saying run cron manually.
| | 06:56 | Now, we're going to go back to
where our site was by turning on those
| | 06:59 | contributed themes and modules. We'll
turn on the modules first since we didn't
| | 07:03 | actually change the theme. Go to
Administer and Modules and you'll see at the
| | 07:09 | top that CCK turn on Content which was
the only one turned on before; go down
| | 07:14 | to the bottom of the page, and say Save
configuration. Once again, it warns us
| | 07:20 | that we might need to check for
available updates. Let's do that now, by saying
| | 07:24 | check manually. Aha! Remember how,
when we first started, we needed a new
| | 07:30 | update to not only the core, but also
to a module. Well it just discovered that
| | 07:34 | fact. So we'll do the process
again by going to Available updates and
| | 07:40 | essentially, repeating the process.
| | 07:42 | However, to replace a module you
don't have to do all of those backups and
| | 07:46 | moving files around. It's a much
simpler process. Simply click on Download, and
| | 07:52 | go to the place where the file was
downloaded. Again, for us that's the
| | 07:55 | desktop. We close this window, go
to the desktop, and hide everything.
| | 08:00 | Now, we'll go to the place in our
Drupal folder where we would install that
| | 08:03 | module, that's in Sites and Default
in the modules folder. There is our old
| | 08:10 | CCK. I am going to take that out of the
Drupal directory by dragging it to the
| | 08:15 | desktop. I am going to rename it cck-
OLD. Now, I'll unpack the new version of
| | 08:25 | CCK and drag it in. Then we can go back
to our administrative interface and try
| | 08:32 | refreshing this page to make sure that
we have all available updates. Yes, we
| | 08:38 | are all up to date. Let's go to
Administer and Modules to make sure that it's
| | 08:43 | turned on and indeed it is.
So we are all updated.
| | 08:48 | The last thing we have to do of course
is to return the site to Online mode,
| | 08:52 | remember to do this, or else your site
can be done for a long time before you
| | 08:56 | realize. Go to Administer, scroll down
to Site maintenance and turn it online
| | 09:02 | again, and Save Configuration. Now,
just to be sure, we are going to go to our
| | 09:07 | ordinary user and refresh the screen.
There we are; the ordinary user is back
| | 09:15 | online as is the entire site.
| | 09:18 | Congratulations, you've just done a
difficult process that is nonetheless very
| | 09:22 | necessary. The Drupal project releases
updates fairly and frequently. Typically
| | 09:27 | every few months for the core with
major updates only about once a year, but if
| | 09:32 | you have lots of modules, you'll
probably find yourself updating those ones
| | 09:36 | much more frequently. If you need
further help with upgrading, the Drupal
| | 09:40 | project maintains extensive
documentation at drupal.org/upgrade.
| | Collapse this transcript |
|
|
5. Understanding Drupal AdministrationUsing the Administration menu| 00:00 | Now we move on to the meat of the
matter: configuring Drupal through its
| | 00:03 | browser based administration menus.
Except for those changes that require
| | 00:07 | mucking about on the server, to add or
remove files for example, pretty much
| | 00:12 | every change you make to your Drupal
site will happen through this interface.
| | 00:16 | Fortunately, these menus are fairly
self-explanatory and if you are feeling
| | 00:20 | adventurous you could just start
playing around with them, but here are a few
| | 00:24 | tips and tricks to make your
administration experience easier, safer, and more
| | 00:28 | efficient. You will need to be logged
in as the Administrator to go through this video.
| | 00:33 | The first thing, that we're going to do,
is to go to the Administer menu in the
| | 00:37 | left hand column. If for some reason
this menu isn't working, that is to say if
| | 00:43 | your installation is having problems,
there is another way that you could reach
| | 00:46 | this menu, by typing ?q=admin. That
will always get you back to this menu even
| | 00:53 | if you're having problems with your
Drupal installation, as long as Drupal is
| | 00:57 | actually running. The administration
page contains links to many different
| | 01:01 | parts of Drupal that are available
for you to change the settings; you can
| | 01:05 | reach them through two series of links.
| | 01:07 | The first one on the left side is by
category. Each of these categories is then
| | 01:12 | expanded in the main part of the
screen here. If, for example, you click on
| | 01:16 | Content management, you would see the
same links that you see here in this box
| | 01:21 | under Content management. Click on it,
it shows you those and it also expands
| | 01:25 | them here. Personally, I prefer to just
go to the main Administer link and then
| | 01:30 | use Find to find what I am looking for.
Let's say, for example, I wanted to
| | 01:35 | change the Site information, I will
hit Command+F or Ctrl+F on a PC and if I
| | 01:40 | wanted to, say, see Site information
and there we go. It highlights down here,
| | 01:46 | I can click on it, and go straight there.
| | 01:48 | Another way that you could look
at the links that are available for
| | 01:51 | Administration - go back up to the top
of the Administration page and click on
| | 01:56 | By module. Each one of these blocks
refers to different module, that's
| | 02:01 | installed in Drupal. Drupal is
actually a series of modules, the main one of
| | 02:05 | which is called System and you
can see its Administration here.
| | 02:08 | We are going to look at the files that
make up the Drupal installation and see
| | 02:12 | what those modules actually are.
We'll go to Hide Others and to our Drupal
| | 02:16 | installation folder, which in our case
is in Users/Tomgeller/Sites/Drupal.
| | 02:23 | You can find modules in a few
different places. The first one is in the
| | 02:27 | Module's folder. These are the modules
that came with the Drupal installation.
| | 02:32 | If you have installed any additional
one's they would be in Sites, all, and
| | 02:37 | then there would be folder called
modules or sites default and a folder called
| | 02:40 | modules. If we look here, we see
System and Taxonomy and if we go back to our
| | 02:46 | Administration and scroll down we
see System and Taxonomy. We'll discuss
| | 02:53 | modules and how to add additional
modules in other video in this series.
| | 02:58 | For now, let's go back up to Administer
by Task. After you've been using Drupal
| | 03:03 | for a while, you might find that all
of this extra text isn't necessary,
| | 03:07 | because you know what Comments is and
Content and Blocks and so forth. So, you
| | 03:12 | can hide the descriptions to make
that page much more compact. Many
| | 03:16 | administration pages change as you
alter the site's capabilities. For example,
| | 03:22 | if you add a module, it may actually
change, what another module's page looks
| | 03:26 | like.
| | 03:28 | Let's take a look at a few different
types of administration page. Towards the
| | 03:32 | bottom here, we have a special type
called Reports. This actually shows all of
| | 03:37 | the things that have been happening on
your Drupal system. The most important
| | 03:41 | of these is Status Report. This is
just an informational report, it doesn't
| | 03:45 | actually have very much that you can
set. Although, it does give you links to
| | 03:48 | various places that will help
you in your Drupal administration.
| | 03:54 | Another report that's useful is Recent
Log Entries. This can be very helpful,
| | 03:59 | if you have been having problems with
your Drupal installation, because it will
| | 04:02 | tell you exactly where the problem
started to happen and what the cause was to
| | 04:06 | some extent. After a while as you could
expect, this list will become extremely
| | 04:12 | long and you can filter it. For
example, by the severity of the problem and
| | 04:16 | also by the type, whether it was caused
by user action or by an action of cron
| | 04:20 | and so forth.
| | 04:22 | Let's take a look at a more complex
Admin page; going back to Administer we
| | 04:26 | will look at Blocks. This is a list of
different things that you could put on
| | 04:30 | your Drupal site; for example, in this
top area here, called the Header or in
| | 04:34 | the two sidebars or at the bottom,
what's called the Footer; or actually in
| | 04:37 | this main area here, on
every page, or on selected pages.
| | 04:42 | Each one of these lines represents a
different block and these could, for
| | 04:45 | example, be moved around. Let's take
this one, Who's Online, for example. We
| | 04:51 | can click and drag it by that little
arrow symbol and let's put it on top of
| | 04:57 | Navigation here. You will notice the
little asterisk, which says that it's not
| | 05:01 | saved until you click on Save Blocks
and there we are. Now we have this extra
| | 05:06 | block up here for online users. In
addition to being able to click and drag
| | 05:11 | these blocks, you can use the popup
menu, to change the where they appear or
| | 05:15 | you can further configure them by
clicking on the configure button.
| | 05:19 | You can also change the way that
you see the site beside when you are
| | 05:22 | administrating it.
| | 05:23 | Let's go back to Administer, there is
a special link down here, called the
| | 05:27 | Administration theme, this changes the
look only when you're administrating it
| | 05:30 | that changes what the Administrator see,
from what the regular users see. To do
| | 05:35 | that you just change the popup here and
let's change it, let's say to Chameleon
| | 05:41 | and go to Save Configuration.
Instantly we have a different look for the
| | 05:45 | Administrator.
| | 05:46 | Now, if as we Log out as the
Administrator, which we can do down here, you will
| | 05:51 | see the original theme, which is
different from the Administration theme. Other
| | 05:55 | videos in this series will show
details on some of these Admin screens in the
| | 05:59 | Core Drupal installation and the
chapter on Modules shows you how to configure
| | 06:02 | some other more popular third-party
modules. I urge you to just spend some time
| | 06:07 | wandering through the Admin screens
with all of Drupal's capabilities and
| | 06:11 | options it's easy to forget where
important settings are hiding. The more time
| | 06:15 | that you spend in these Admin screens,
the faster you will remember where they
| | 06:19 | are.
| | Collapse this transcript |
| Setting site information| 00:00 | By now you are probably itching to put
your own fingerprints on this website to
| | 00:04 | make it truly and unmistakably yours.
You can make two basic changes that will
| | 00:09 | quickly move you away from this
generic default Drupal site. First, you will
| | 00:14 | change some text that appear
throughout the site to give it its identity. We
| | 00:17 | will show you how to do that now.
| | 00:19 | In another video we will also show you
the second way to personalize the site
| | 00:22 | by changing its visual theme. We will
give you a little taste of that now as
| | 00:27 | well, but first things first. We will
change the basic text that appears on
| | 00:31 | your site by going over to
Administer and then scrolling down to Site
| | 00:37 | information. You may recognize some of
this text because we entered it when we
| | 00:42 | first installed Drupal. Some of it
however has been left blank; we will fill
| | 00:46 | that out now. You may remember that our
site is about living underwater. So we
| | 00:51 | are going to make our slogan, 'Where
damp basements are a feature, not a bug."
| | 01:01 | Our mission statement is 'to give
real estate parity with stock options,' not
| | 01:07 | sock options, but stock options.
'underwater.' Yeah, it's a little bit of
| | 01:13 | investment joke there and for our
footer we will just say, Copyright 2008,
| | 01:20 | Underwater Reality. Finally, there's a
little bit of other information that you
| | 01:25 | can enter at the bottom here. We
generally don't need to touch that unless for
| | 01:29 | some reason you wanted to change the
name of an anonymous user to something
| | 01:32 | else like anonymous fish or something.
The Default front page- I would strongly
| | 01:36 | recommend that you not play with it. It
is somewhat of an advanced Drupal topic.
| | 01:40 | We will Save Configuration here. Noting
is changed on our front page except for
| | 01:44 | adding this mission statement here -
To give real estate parity with stock options.
| | 01:49 | So how can we make the other information
show up? Well we can do that in the theme.
| | 01:53 | We will go back to Administer
and down to Themes. Here we see a list of
| | 01:58 | all of the different themes, which are
available by default when you install
| | 02:02 | Drupal 6.3. Right now we are on Garland,
so we are going to configure that by
| | 02:07 | clicking on Configure. On the Theme's
page you see quite a bit of information
| | 02:11 | of things that you can change to make
your site look different. One thing you
| | 02:15 | can change is the Color scheme and
we will show you how to do that in the
| | 02:18 | Themes video, but the information
that we want is down towards the bottom.
| | 02:22 | You can toggle display of various
things and here we see the mission statement,
| | 02:26 | which we entered before is checked.
That's why we had that slogan there - to
| | 02:30 | give real estate parity. The one that
isn't checked is Site Slogan, right here.
| | 02:35 | "Where damp basements are a feature,
not a bug." So we will go down to the
| | 02:39 | bottom and say Save Configuration. Go
back to our front page and there it is.
| | 02:44 | It's been added on to the end
of our site name right there.
| | 02:49 | Let's go back to Administer and Themes
to take a look at few other options that
| | 02:53 | are there for changing basic site
information. We will scroll down to Garland
| | 02:57 | and click on configure again. These
settings are specific to only one Theme. If
| | 03:03 | you have several Themes installed and
enabled in the Themes Menu then you can
| | 03:08 | change the behavior of all of them by
clicking on Global Settings. Once again,
| | 03:13 | we will discuss these more
in another video on Themes.
| | 03:15 | There is one other settings we can
change to change the way that our site
| | 03:19 | looks. Although, this will only
change the way the site looks when it's
| | 03:22 | off-line. If, for example, you have
taken it off-line for administrative
| | 03:25 | reasons. We go Administer, scroll
down to the bottom, and Site Maintenance.
| | 03:32 | Should you decide to take it off-line,
it will just show a very simple screen
| | 03:36 | with this text; we could say,
Underwater Reality's offices have just been
| | 03:43 | flooded. We should be back shortly. I
am actually going take it off-line and
| | 03:49 | show you how to put it back Online,
just so that you can see that message. It
| | 03:52 | goes off-line. Save Configuration. Now
let's go back to our homepage and log out.
| | 03:59 | This is the way that people will see
the site, if it has been taken off-line.
| | 04:03 | We can Log in again by going to ?Q=user
and then Log in as our admin; and there
| | 04:14 | we have it. We go back to Administer,
click Site Maintenance, put the site back
| | 04:22 | online, Save Configuration, and we
are back in business with all of the new
| | 04:27 | information that we had.
| | 04:29 | As mentioned earlier, several other
videos in this series go into much greater
| | 04:34 | detail on how to customize your site,
particularly, with Themes and CSS, but
| | 04:40 | for the small amount of time it takes
to craft a few descriptive phrases few
| | 04:44 | actions that has much affect in Drupal
as taking those steps that you saw here.
| | Collapse this transcript |
| Setting the theme| 00:00 | So now your Drupal site is up and
humming smoothly, but it still looks rather
| | 00:05 | generic. In Drupal, presentation is
controlled by a system of page templates,
| | 00:10 | which collectively is known as themes.
So all we need to do to change the
| | 00:14 | entire site's appearance is to change
its theme. Fortunately, that's easy to do
| | 00:18 | in Drupal. Just as a reminder, none of
the site's content will change in this
| | 00:23 | process. That means you can switch
back and forth among many different themes
| | 00:27 | without losing your articles, graphics,
users or site information. There are
| | 00:33 | literally hundreds of themes available
online with a variety of looks and for a
| | 00:36 | variety of purposes. For example, to
make your site look good on mobile phones,
| | 00:41 | we will look at some of those in
another video, but for now, let's stick the
| | 00:44 | six that come with Drupal 6.3's default installation.
| | 00:48 | I will show you how to change the
default theme, that is, how the site looks to
| | 00:52 | every casual visitor before they
become a member as well as how to let your
| | 00:56 | site's registered users select a
different look that they like better. The
| | 01:00 | first place that we go is over to
Administer and then down to Themes. Here we
| | 01:07 | see a list of themes that are available.
By default, Garland is the theme. But
| | 01:12 | we can change that by clicking in
Default on any of these other ones. We will
| | 01:18 | do that now and change the theme to
Bluemarine. Scroll down to the bottom and
| | 01:22 | Save Configuration. There, the entire
look of the site has changed. One other
| | 01:27 | thing has changed by the way, the
Enabled box is now checked because obviously
| | 01:31 | if this is the Default theme, it has to
be enabled first. I am going to change
| | 01:35 | it back to Garland now, Save
configuration, and we are back at Garland, but
| | 01:41 | notice the Enabled box is still checked.
There are a few things that carry over
| | 01:46 | when you go from theme to theme and
some things that don't. For example, we
| | 01:50 | have up here, 'Where damp basements
are a feature not a bug.' That was
| | 01:54 | something entered in site
information as, I believe, the slogan.
| | 01:59 | Let's switch to Chameleon, for example,
Save that configuration and that slogan
| | 02:04 | has disappeared. We can make it
reappear by enabling it in this specific theme
| | 02:10 | or by making this slogan appear in
every theme. Let's just do it for this one.
| | 02:15 | We click on Configure and we get many
different options, one of them being,
| | 02:19 | whether or not the site slogan shows up.
Let's try clicking on that, go down,
| | 02:25 | Save Configuration, boom, there it is,
it now shows up. If we want to change
| | 02:30 | what shows up in every theme, we can
go to Global settings and then when we
| | 02:35 | click Site slogan, and say Save
configuration, no matter what theme we go to
| | 02:41 | now, the site slogan will show up. If
for example, we were to go to Marvin, the
| | 02:51 | site slogan now shows up. Let's go
back to our original theme, which was
| | 02:56 | Garland. In the process,
we have enabled four themes.
| | 03:01 | I will show you how to make those
themes available to each registered user now.
| | 03:06 | First, we have to give them that
permission by going to Administer, scroll down
| | 03:10 | to Permissions and then scroll down to
select different theme. Authenticated
| | 03:19 | users are those who have become members
of your site. Anonymous users are those
| | 03:23 | who haven't. So we will say yes only to
those people who have become members to
| | 03:26 | the site, Save permissions. Now any
user who goes to their local My account
| | 03:32 | page over here and clicks on Edit,
will be able to change the theme that they
| | 03:37 | see. For example, this user wants to
see Bluemarine, Save and, boom! That
| | 03:44 | didn't change the theme for anybody
else, only for this user. We are going to
| | 03:48 | change back to Garland. Go back into
themes and clean up what we did, just to
| | 03:56 | make it clean. Garland becomes the Default
theme, Save the configuration and we are done.
| | 04:05 | So here we have talked about how to
move from theme to theme and how to change
| | 04:09 | some of the things that show up
within a theme such as slogans and mission
| | 04:12 | statements. There are hundreds of
themes out there though, so you can do more
| | 04:16 | than just switch among them. You can
change the way that the typography looks,
| | 04:20 | the graphics in them and the way
that they behave by editing them.
| | Collapse this transcript |
|
|
6. Managing Users on Your SiteUnderstanding security and permissions| 00:00 | The best site should be protected with
the best security. So let's take a look
| | 00:04 | at some steps you can take from the
very beginning to ensure that you have
| | 00:06 | complete control over who can access
and change your content. We won't go into
| | 00:12 | how to configure user roles within
Drupal in this video. We will do that in
| | 00:15 | another video. But a little bit of
planning now will save you a lot of meddling
| | 00:19 | about when that time comes and could
prevent some disastrous security errors.
| | 00:24 | When you run a Drupal site, you will
be concerned with security on three
| | 00:28 | levels. First, the server, which
contains all the core programs that run
| | 00:33 | Drupal, any additional programs you
have added, such as modules and any custom
| | 00:38 | programming that you created. Server
security is especially important because
| | 00:43 | some configuration files store
passwords in plain text. If your server security
| | 00:48 | is bad, someone might be able to break
in and look at those passwords without
| | 00:52 | you ever knowing that it happened.
MySQL contains virtually all of the content
| | 00:58 | of your site. If your MySQL security
is improperly set, an attacker could
| | 01:03 | change the site's content,
including matters relating to your user's
| | 01:06 | identities. With full access to the
MySQL database, the attacker can also
| | 01:11 | change user passwords effectively
giving them full access while removing yours.
| | 01:17 | Finally, we have Drupal security, flaws
in which can cause very similar effects
| | 01:22 | to flaws in MySQL security because
really, Drupal is essentially just a nice
| | 01:27 | user interface for the
database and the web server.
| | 01:31 | So while it would take a MySQL expert
to cause particular vandalism through
| | 01:36 | MySQL security flaws, even a novice
attacker with full Drupal access could
| | 01:41 | change content and passwords easily
and efficiently. So let's take a look at
| | 01:45 | Drupal security. In short,
here's what you need to know.
| | 01:49 | As it's installed by default, Drupal
security is user based, that is, you
| | 01:54 | categorize users as being members of a
group and set limits on what members of
| | 01:59 | that group can do. Among the users,
there is one super user. That's the
| | 02:04 | administrator that you created when
you first set up Drupal. That one has the
| | 02:08 | ID of 1, if you go into the MySQL
database. The second part of Drupal security
| | 02:14 | is the two groups that are
automatically built in, one is called Anonymous, the
| | 02:19 | other one is called Authenticated.
| | 02:20 | Authenticated users are all those
who have signed up for your site, while
| | 02:24 | Anonymous users are those who just
happened to be browsing it without signing
| | 02:28 | in. Finally, Drupal security allows
you add more groups as you need them and
| | 02:33 | you probably will do that if you have a
collaborative site. So for example, you
| | 02:36 | may have one group that's Editors and
one group that's Writers and another
| | 02:40 | group that's Graphic Designers each
one of which can only affect their
| | 02:44 | particular area. There are other ways
to controlled user access. Most important
| | 02:49 | however, is the permissions
administration screen. You get to that screen by
| | 02:54 | going to Administer and then scrolling
down to Permissions. Here you see all of
| | 03:00 | the different kinds of permissions that
you can set. Each one of these lines is
| | 03:04 | a different sort of permission and each
one of the columns is a different sort
| | 03:07 | of user. As you can see, you have your
two built-in users here, Anonymous who
| | 03:12 | have not signed in and Authenticated,
who have. As we scroll down, there is a
| | 03:16 | nice little trick here that Anonymous
and Authenticated stays at the top, so
| | 03:22 | you always know which column you are working
with. That's new in Drupal 6 by the way.
| | 03:26 | By default, all users can access
content, however that's pretty much it. So
| | 03:31 | anytime you add an additional
module or want to give permission to your
| | 03:35 | Authenticated users to do something,
you have to give them that permission
| | 03:39 | specifically by turning it ON with
a checkbox and then click on Save
| | 03:43 | permissions. Another way that you
can change Permissions is to go in to
| | 03:47 | Administer and then instead of seeing
it by Task, see it by Module. In each one
| | 03:53 | of these groups, you will see a
Configure permissions, which will bring you
| | 03:56 | specifically to the part of that
permission screen that deals with that
| | 04:00 | particular Module. For example, Block,
let's click on Configure permissions and
| | 04:04 | it automatically jumps down to the
Blocks area, which has two different things
| | 04:09 | that can be set. Besides giving you
ways to control access through the
| | 04:13 | permission screen, Drupal also offers
some limited ways of looking at access
| | 04:17 | logs, which can be useful for tracking
attacks. For example, a series of failed
| | 04:23 | login attempts in very close
succession could be a sign that someone is using
| | 04:27 | an automated program to guess at your
users passwords. Let's go and take a look
| | 04:31 | at some of those reports. Go to
Administer and then scroll down to Reports and
| | 04:38 | here you can see Recent Log Entries
which is everything. If there have been any
| | 04:42 | Access Denied Errors, you can see
those and then if people happen to go to
| | 04:46 | pages that don't exist, you can even
see those. Let's take a look at log
| | 04:50 | entries here. This is in a reverse
chronological order, so the most recent ones
| | 04:55 | are at the top. But you could
change that by clicking on any of these
| | 04:58 | highlighted columns. For example, to
sort by type, click here and then to sort
| | 05:03 | in the opposite direction, that is from
Z to A, you would click again. Let's go
| | 05:08 | back to date and then click again to
see it again from most recent to least
| | 05:15 | recent. In addition, you can filter
these log messages, for example, only to
| | 05:19 | show those things that were an
emergency level or of another high level. If you
| | 05:24 | hold down the Shift key, for example,
we can see everything from warning on up
| | 05:28 | and then click Filter. That cuts out a
lot of the noise that might otherwise
| | 05:33 | distract you.
| | 05:35 | Finally, we should mention of some
parts of Drupal that are particularly
| | 05:38 | vulnerable to attacks. First of all,
any third party modules, which were
| | 05:43 | programmed by individuals, and then
contributed to the Drupal project, they
| | 05:47 | tend not to have as much oversight as
the main Drupal project which of course,
| | 05:51 | has dozens of people looking at it at
any one time. Secondly, PHP and MySQL
| | 05:57 | issues are always popping up and this
is much larger than Drupal. It's a good
| | 06:01 | idea for Drupal administrators to
keep an eye on these matters as well
| | 06:05 | although, if you follow the Drupal
news, they will usually report any that
| | 06:08 | affect Drupal. Finally, most
important to watch out for is good old social
| | 06:13 | engineering and by that, I mean
getting e-mails that say, I am your
| | 06:16 | administrator, give me your password or
anything else that's basically tricking
| | 06:20 | your users.
| | 06:22 | As always, your main source of
information about Drupal should be drupal.org
| | 06:28 | specifically for security purposes,
drupal.org/security. On drupal.org/security
| | 06:34 | page, you will see a list of advisories
in reverse chronological order. So the
| | 06:39 | most recent show up at the top. This
video briefly discusses measures to
| | 06:43 | protect the very top level, that is to
say, Drupal itself. But then again, your
| | 06:49 | Drupal installation is available to
everybody on the internet, if you make it
| | 06:53 | public. Fortunately, a
knowledgeable application of Drupal's user based
| | 06:57 | security systems is enough to stop most attacks.
| | Collapse this transcript |
| Controlling site access with user management| 00:00 | Drupal comes with one special superuser
account that can access everything and
| | 00:04 | two built-in roles. One of them for
members who have signed up for your site
| | 00:08 | and the other one for anonymous
people who are just coming to the site and
| | 00:12 | haven't signed up for it. But you can
add as many more roles as you like and we
| | 00:16 | will show you how to do that.
| | 00:18 | First, go over to Administer, then
scroll down to the area User Management. We
| | 00:24 | are going to change Roles. And here
you can see that it lists the two roles
| | 00:28 | that come as part of the Default
Drupal installation, anonymous and
| | 00:31 | authenticated. It's very easy to add
an additional one. Let's say that we are
| | 00:36 | building a site where some people are
allowed to contribute content, but others
| | 00:40 | aren't, let's call them Contributing
user and say Add role and there we are, we
| | 00:47 | have added a new role, but we haven't
actually given them permission to do
| | 00:51 | anything, so to go there, let's click
on edit permissions. Now we can see all
| | 00:57 | of the permissions that, that new
user can add. But there is a bit of a
| | 01:00 | problem, we can't really compare what
this user can do against all of the other
| | 01:04 | users. So let's go back and instead of
clicking on Edit permissions here, we
| | 01:10 | will go to Administer and Permissions.
There, now we see anonymous user,
| | 01:19 | authenticated user and contributing
user, all on one screen. In reality, we
| | 01:25 | don't have to check these boxes because
members of the Contributing user group
| | 01:28 | are also authenticated users. I like
to check them any way, just for visual
| | 01:32 | clarity and then Save permissions.
| | 01:39 | So, so far, this user is only on parity
with the authenticated user. Since this
| | 01:44 | is a contributor who is going to be
writing things, we are going to give them
| | 01:47 | access to create pages, and create
stories. Now if we scroll down to the bottom
| | 01:54 | and say Save permissions, we have
created a new kind of user that has those
| | 01:59 | additional permissions and any user
that we have on our system can be made in
| | 02:03 | to a Contributing user. We will show
you how to do that in another video.
| | 02:08 | So now we have created a type of
user that has all the rights of a normal
| | 02:11 | authenticated user, but with some
additional ones. We can take any user who is
| | 02:16 | already on the system and give them
that role in addition to what they already
| | 02:20 | have and in fact, if we continue adding
roles, somebody could have one role or
| | 02:24 | multiple roles simply by adding that
from the administrative interface. As you
| | 02:29 | add more roles, you have to be careful
because these columns will keep getting
| | 02:34 | wider and wider and at some point,
it's going to go off the screen, that
| | 02:37 | becomes very difficult to manage, not
only from going from one to another, but
| | 02:42 | also because it's going to become
harder and harder to keep one type of user
| | 02:47 | separate from another in your mind. So
we recommend a lot of simplicity when
| | 02:51 | you are designing user roles. Don't
add any that you don't need to add.
| | 02:55 | In addition to giving users a new role
explicitly, some Modules will let you
| | 03:00 | escalate user roles based on
participation. For example, if somebody comments a
| | 03:05 | lot or if somebody writes a lot of
blog posts, there are modules that will
| | 03:09 | automatically elevate that person's permission.
| | 03:12 | Another type of Module lets you see
certain types of content only if you are at
| | 03:16 | a certain user role. So you can see
that these user roles actually have a lot
| | 03:20 | of use once you start mixing in
modules that take advantage of them.
| | 03:24 | Finally, I would advise everybody to
plan out what roles are going to be needed
| | 03:28 | on a site before you start
implementing them. That will help you keep it
| | 03:31 | simple, but realize that you may have
to add more even beyond the plans you
| | 03:36 | originally made as your site develops.
| | Collapse this transcript |
| Creating users| 00:00 | Most of what you will do in this
course looks at your site from the point of
| | 00:03 | view of an Administrator. But now it's
time to step across the threshold and
| | 00:07 | see what the site looks like from
the other side, that is, from that of a
| | 00:10 | visitor. We will do this by going
through the sign up procedure as it's defined
| | 00:14 | in Drupal's default configuration and
then we will look at some of the options
| | 00:18 | that you as the administrator have,
to change that membership process.
| | 00:22 | First, we are going to log out, so we
are no longer the Administrator. If I was
| | 00:27 | someone coming across your Drupal
website like this for the first time, I might
| | 00:31 | be able to create a new account. Here
I would put in my proposed Username,
| | 00:36 | let's call me fishyjoe and my e-mail
address fishyjoe@example.com and Create
| | 00:44 | new account. You will notice this
message up here that tells us that further
| | 00:48 | instructions have been sent to that e-
mail address. Now I am going to go in to
| | 00:52 | my site as the Administrator to see
what happens when a user tries to create an
| | 00:56 | account. Admin -- to do so, we go to
Administer, down to Users and here we have
| | 01:09 | the member fishyjoe. Let's take a look
at some of the options that we have to
| | 01:13 | edit. We can change the Username, if
for example, they have put in something
| | 01:17 | obscene or unwanted, their E-mail
address, we can change their Password, their
| | 01:22 | Status, so if for example, we have
some reason to block them, we can do that
| | 01:25 | here. We can also give them a role.
We had previously created this one
| | 01:30 | contributing user, so let's say we
know who fishyjoe is. We can say Oh! Yeah
| | 01:35 | and we know that we want that person
to be a Contributor, we can click that.
| | 01:39 | They will automatically be an
authenticated user because that's what all
| | 01:42 | members become. And let's just say Save here.
| | 01:46 | By default on Drupal, the user will
receive an e-mail to the address that they
| | 01:51 | gave saying, we understand you would
like to become a member, please click on
| | 01:54 | this special link to finish your
registration process. The reason that's done
| | 01:59 | is because so many people will enter
false e-mail addresses and that's one way
| | 02:03 | that abuse happens on websites. So
this makes sure at least that the e-mail
| | 02:07 | address is proper and true. If the
person doesn't have that e-mail address,
| | 02:12 | then they would never receive the
message that would give them their secret
| | 02:15 | link. So the users can create their own
accounts but the Administrator can also
| | 02:20 | add users as they like. It's on the
same screen, which again is Administer and
| | 02:24 | then Users by just going Add user.
Let's add fishysue and the e-mail address
| | 02:32 | fishysue@example.com. Once again, you
would set a password. Oops! I didn't set
| | 02:42 | it the same so let's try that again,
password again. Good, the passwords match,
| | 02:49 | although it's not a very high password
strength. This is an automatic feature
| | 02:52 | in Drupal 6, it checks to make sure,
you are giving the best passwords
| | 02:55 | possible. And again, you can set
certain features, I don't know why you would
| | 03:01 | set a new account that would be Blocked,
but you have that option. Finally, if
| | 03:05 | you like, you can notify the user of
new account in which case, it will send an
| | 03:08 | e-mail to that fishysue@example.com
address in our example here. You might not
| | 03:14 | want to do that, if for example, you
have spoken to that person and said here,
| | 03:17 | you are sitting right here, I'll just
create your account there. You don't
| | 03:19 | really need an e-mail to tell you
that you have this. And then you just say
| | 03:23 | Create new account, there.
We have a new account created.
| | 03:27 | You can also prevent people from
entering certain types of user names or
| | 03:31 | registering e-mail addresses from
certain domains, say for example, your
| | 03:35 | competitors. You can do that by going
to Administer, Access rules. Let's add a
| | 03:41 | rule that will let us see what sort of
options we have to block. First you can
| | 03:46 | choose to only allow addresses and user
names and so forth that meet a certain
| | 03:51 | pattern or by default, you can deny
them. Let's say that we want to deny all
| | 03:55 | people with user names that contain
squid in them. These special characters
| | 04:00 | down here let you block certain kinds
of wild-card patterns. The % sign blocks
| | 04:05 | all strings, no matter how long they
are. So for example, if I didn't want
| | 04:10 | squidsue and joesquid, I would say %
squid% and then Add Rule. Now if I want to
| | 04:20 | check to see what sort of names I can
add, we will do Check rules. Say username
| | 04:25 | jimmythesquid and check the username,
Aha! It's not allowed. However if I were
| | 04:31 | to do tomtheoctopus, and check that
username, that is allowed. Let's go back to
| | 04:38 | our list and just delete that one.
| | 04:43 | You have many more options of how
users register for your site. Let's go to
| | 04:48 | Administer and User Settings to see
exactly what those are. This is a very long
| | 04:54 | screen. It has many, many options in it
including long texts here that you can
| | 04:58 | edit. But really, it's only broken
down in to four sections. At the top you
| | 05:03 | have basic registration settings, the
first set of radio buttons lets you make
| | 05:07 | it so that only you can create user
accounts, it takes away that link that says
| | 05:11 | create your own account. The second one,
which is ON by default, lets visitors
| | 05:15 | create their own account and you don't
have to approve everyone. The third one
| | 05:19 | lets visitors create accounts but
only will become members if you say yes.
| | 05:24 | Again we talked about e-mail
verification and the third section lets you put
| | 05:28 | some help texts. So for example, You
can't use the word squid in your username,
| | 05:38 | for example. That will appear above
the form when people are signing up for
| | 05:41 | their accounts. The user e-mail
settings let you change what sort of e-mail
| | 05:46 | people get when they sign up for the
site. There are several different options
| | 05:50 | here, one is if the user is created by
the Administrator, that's a different
| | 05:54 | message from if somebody has
created their own account which is another
| | 05:58 | different message from if somebody
has created an account but it has to be
| | 06:01 | approved by an Administrator. The
third section, lets users put in Signatures
| | 06:08 | at the end of their user profiles.
Then for example, they could comment on
| | 06:12 | forum posts and at the end of all of
their comments, it would have some small
| | 06:16 | block of text. By default, it's
Disabled. Similarly, the picture section lets
| | 06:21 | people put a little user picture next
to their account, which can show up next
| | 06:25 | to forum posts, for example or
comments or just in their profile. We will say
| | 06:30 | Save Configuration here. Now let's Log
Out again and say Create new account.
| | 06:36 | Remember how we said, you can't have
the word squid in your username? Well,
| | 06:41 | there it is.
| | 06:41 | Let's log back in as the Administrator
and let's take a look again at our list
| | 06:50 | of users. One final thing that you can
do here is once you have been online for
| | 06:56 | a long time, you'll have a long, long
list of users and you may want to do the
| | 07:00 | same thing to all of them. For
example, block several of them, or delete
| | 07:05 | several of them. You can do that by
checking them as I have just done and then
| | 07:08 | choosing the option that you want from
up here. You can also change the roles
| | 07:13 | that they have, so let's say that
fishyjoe and fishysue have been very good
| | 07:16 | members and you want to say, yeah, I
want to make them a contributing user, you
| | 07:19 | can do that very easily that way and
then click Update. Additionally, you can
| | 07:24 | show only those people who are
contributing users, by clicking on the role and
| | 07:29 | then clicking on Filter with
Contributing User selected and so forth with
| | 07:33 | permissions and status.
| | 07:35 | As you can see, Drupal gives you
considerable control over how people register
| | 07:39 | for your site and what they can do on
it and there's further control available
| | 07:43 | through third party modules that are
available for download. Through these
| | 07:47 | tools you can manage how users go
from being an anonymous user to an
| | 07:51 | authenticated user and then in
addition, give them other permissions as is
| | 07:55 | appropriate for them.
| | Collapse this transcript |
| Setting user profiles| 00:00 | One of the ways that you can control
what your users do is by allowing them to
| | 00:04 | have their own identities in their
profiles. For example, do you want them to
| | 00:09 | be able to upload icons of themselves?
Should their posts be able to include
| | 00:13 | signatures? Should they be allowed to
change their usernames? Controls for
| | 00:18 | these options are hidden away in
several parts of Drupal's administration
| | 00:21 | interface. This video
will show you where they are.
| | 00:25 | We have set up two users already. We
can see them if we go to Administer and
| | 00:31 | then scroll down to Users. They are
called fishysue and fishyjoe and both of
| | 00:38 | them have contributing user permission.
Some changes that affect user profiles
| | 00:43 | are done by the Administrator while
some are done by the user. Let's take a
| | 00:47 | look at some that you, as the
Administrator, can change. The first thing we
| | 00:51 | will do is go to Administer and
Permissions, and then go down to the user
| | 00:57 | module. Now remember, the anonymous
user is the person who has never signed in
| | 01:02 | to your site. The authenticated user is
the one who signed in to your site and
| | 01:07 | became a member, while Contributing
user is a level that we created. We are
| | 01:12 | only going to work with authenticated
user here. In the user module you have
| | 01:16 | several choices. The second to
administer permissions and administer users are
| | 01:22 | usually reserved for Administrators.
We don't want to give that to every
| | 01:26 | authenticated user. Change your own
username is something that some sites do
| | 01:30 | actually use because it gives a little
bit of fun to each person if they can
| | 01:34 | change their username. But we are not
going to allow them to do that. We will
| | 01:37 | only give them permission to access
other people's user profiles. So we click
| | 01:42 | there and Save Permissions. That's
one example of how the Administrator can
| | 01:47 | give additional permissions to users.
| | 01:49 | Another place is in User settings. Much
of this page, which is shown in another
| | 01:54 | video, has to deal with when people
first sign up on to this site. User
| | 01:59 | registration settings and User e-mail
settings deal with when people first
| | 02:03 | become members. The last two sections
down here, give additional power to users
| | 02:08 | in setting their own identity,
Signature support and Pictures. By giving users
| | 02:14 | Signature support, it means that every
time they post on the site, it will add
| | 02:18 | a little tag of their choosing. For
example, this is the name of my company;
| | 02:22 | this is where I am located. Under
pictures, we have enabled it and you can
| | 02:28 | choose where on the server those
pictures are stored, we are not going to
| | 02:31 | change that in this case. If there is
a default picture, for example, if you
| | 02:35 | want to show say, a little icon of a
fish for all people who haven't chosen
| | 02:39 | their own icon, and you can select how
big the icons can be, by default 85 X 85
| | 02:45 | pixels which is a fairly small icon.
| | 02:49 | In addition, you can set the file size
and give people guidelines. Let's just
| | 02:53 | say, Keep it clean, keep it kind. Very
good and we will say Save Configuration.
| | 03:02 | Now you will see when you do that, it
will save the options and then it will
| | 03:06 | also create this additional directory
to store those pictures. There's one
| | 03:09 | other place that we can change the
permissions we give users to set their own
| | 03:13 | identity and to let other people
contact them. That would be under Administer,
| | 03:20 | Permissions and the Contact module. If
you want to allow people to contact the
| | 03:27 | site administrator, you would say yes,
Access the site-wide contact form and
| | 03:33 | then go down to the bottom and say Save
permissions. Finally, there are certain
| | 03:37 | changes that are affected by the user.
These are, as I mentioned, the Signature
| | 03:42 | and Picture, which the user can choose
to include or not include and whether
| | 03:46 | they give a personal Contact form.
| | 03:48 | We have already seen, how you can
allow users to include a Signature and a
| | 03:54 | Picture. The personal contact form
would allow users to open up their e-mail
| | 03:59 | box to all of the other users on the
system to a form that's created on the
| | 04:03 | site. To turn this ON, you would go in
to the Contact form administration link
| | 04:09 | and then go to Settings. By default
it's turned ON. That is to say, each user
| | 04:15 | can send messages to other users. If
you don't want that to happen, possibly
| | 04:19 | because you want to avoid abuse, you
could turn it OFF. But we are going to
| | 04:22 | leave it ON.
| | 04:24 | Now that we have made the
Administrator settings, we can take a look at what
| | 04:27 | individual users can actually do. To
do that, I am going to sign in as an
| | 04:32 | ordinary user while keeping this
administration window open. Unfortunately, you
| | 04:36 | can't do that in one single browser
because the browser holds a cookie that
| | 04:41 | says who is logged in at the moment.
So you can't have more than one person
| | 04:44 | logged in. One way I have found that
works really well to keep more than one
| | 04:48 | user signed in is to have more than
one browser type on your computer. For
| | 04:52 | example, here we are looking at
Safari for the administrator. I am going to
| | 04:56 | switch over to Firefox, a different
browser, and go to my site. So I am going
| | 05:02 | to login here as fishyjoe and let's say
he set his password to booth. Login, we
| | 05:10 | don't need to remember that. And there
we are. Now let's go to his own account
| | 05:15 | and see what sort of options are
available to him as an ordinary user. Click on
| | 05:18 | My account and then click on Edit.
He can change his e-mail address if he
| | 05:23 | wants. He can change his password and
here, since we are allowing signatures,
| | 05:27 | he could say, "Yarr, I be Fishy Joe!"
He can also upload a picture and here's
| | 05:36 | where he can set that personal contact
form. It gives a little bit of help text
| | 05:39 | here to explain to fishyjoe exactly
what happens if he enables this. Let's go
| | 05:44 | ahead and enable it though. He can
change his time zone if he likes and click Save.
| | 05:50 | So there you can see the user has
certain powers to affect their own identity.
| | 05:54 | You as the Administrator can give them
additional powers and I will show you
| | 05:57 | how to do that now.
| | 05:59 | First, I am going to switch back to
the Administrator interface by going back
| | 06:02 | to Safari. We can give users additional
powers by going to Administer, Modules
| | 06:09 | and turning ON a Module that's called
Profile. Click in there and then click
| | 06:14 | Save Configuration and we will just
check to make sure that's the most recent
| | 06:18 | version and indeed, it is. To see what
that Module controls, we are going to go
| | 06:24 | to Administer and then down to
Profiles, which is under User management.
| | 06:30 | Profiles allow you to add additional
fields. So if for example, you want to
| | 06:34 | find out, how old the person is or
what their favorite restaurant is or
| | 06:38 | anything like that, you can do so.
Let's add for example, a single line text
| | 06:43 | field to the profile. This is going
to be called Personal information, the
| | 06:49 | Title will be Age, the Form name is an
internal name that Drupal uses. You must
| | 06:56 | make sure that you don't use the same
name for more than one field. We will
| | 06:59 | just call this profile_age and here
we will explain, Please enter your age.
| | 07:06 | Underneath that, you have several
options, for example, you can make it a
| | 07:10 | hidden field, which only Administrators
could see. For example, you could say,
| | 07:14 | this person is a troublemaker and
the user will never see that. But
| | 07:17 | administrators could tag each
individual user with special information. You can
| | 07:21 | make it a private field that only
certain users can see. Public field. That's
| | 07:25 | only shown in some places or a public
field that's shown throughout the site,
| | 07:29 | wherever it appears. We are going to
keep it as a public field that's shown on
| | 07:33 | the profile page only, which is the
default. Page title is if you want to
| | 07:38 | create a page, that has all of these
fields for all of the users, for example,
| | 07:43 | here's a page with the list of every
body's age. We don't really need to do
| | 07:47 | that. So we are going to leave that
blank now. Finally, you can choose where
| | 07:52 | exactly it appears, that is if it's
the first thing, the second thing, and so
| | 07:56 | forth, by changing Weight. We are not
going to change that right now because we
| | 07:59 | are only adding one field. But after
you have to have numerous fields you may
| | 08:03 | start playing around with
which one appears first.
| | 08:06 | In our case, we really want to know,
how old somebody is. So we are going to
| | 08:10 | force them to enter value and further
more, we think, they should enter it when
| | 08:15 | they first register for the site. So
I am going to click Visible in user
| | 08:19 | registration form. This form will auto
complete while the user is typing, will
| | 08:24 | look for other values that are already
in the system and suggest the ones that
| | 08:27 | match the first two letters that
somebody has entered. We will click on Save
| | 08:31 | field. There, we have created a new
field called Age. Well, what exactly does
| | 08:36 | that do? Let's go back to the user,
fishyjoe and let's click Edit again. Now we
| | 08:43 | are editing his personal account,
but you will see a new addition here,
| | 08:47 | Personal information. We click on that
and we see, ah! They are requiring me to
| | 08:52 | enter my age right now. So we will do
that. Click on Save and there it is.
| | 08:58 | As you can imagine, you could have
quite a lot of information in the user
| | 09:01 | profiles, for example, for a dating
site, you might have age and gender and
| | 09:07 | what you are looking for and so forth
and all of that could then be used for matching.
| | 09:11 | We have only just scratched the surface
of what you can do with profiles. Other
| | 09:15 | modules that you can download let your
users apply information that they enter
| | 09:19 | in their user profiles. For example,
if you ask everybody for their location,
| | 09:24 | one particular module collects all of
that information and then can show a map
| | 09:28 | that tells you where all of the users
are and who exactly is near you. The user
| | 09:33 | account information and profiles
can be a very powerful way of building
| | 09:37 | community on your Drupal site.
| | Collapse this transcript |
| Creating contact forms| 00:00 | One sign of a professional quality
website is that it gives ways for its
| | 00:04 | visitors to provide feedback to the
administrators and other members in a
| | 00:07 | controlled and helpful way.
| | 00:10 | In order to turn on contact forms,
you first go to Administer and then to
| | 00:15 | Modules. From there you will scroll
down until you see the Contact Module,
| | 00:19 | which is off by default. If you haven't
done so, just click it like so, scroll
| | 00:25 | to the bottom and save your
configuration. Once you have turned on your Contact
| | 00:31 | Dorm Module, you then administer it by
going to Administer and Contact Form.
| | 00:37 | Right now, we have no contact forms
already installed. We will add them by
| | 00:41 | adding a Category and
then filling out this form.
| | 00:46 | The Category describes what sort of
form it is. For example, we will have
| | 00:50 | Website feedback and that will go to
the webmaster@example.com. You can also
| | 00:58 | indicate an auto-reply, which will send
e-mail back to the sender whenever they
| | 01:02 | use this contact form. We are not
going to do that now, so we will pass that.
| | 01:07 | The Weight pop-up lets you reorder your
contact forms so that some will appear
| | 01:12 | at the top and others lower down in
the list. We will leave it as it is now
| | 01:15 | since we only have one contact form.
Finally, the selected pop up lets you
| | 01:20 | determine which contact form will be
turned on by default. We will say Save and
| | 01:25 | we have created our first contact form.
| | 01:27 | But what exactly does that look like?
To find out, we go to the page that's
| | 01:32 | created within Drupal, which is your
website address followed by /contact. And
| | 01:38 | there we have the contact form. This is
what somebody would see if they wanted
| | 01:42 | to send an e-mail to the administrator.
It already comes filled in with the
| | 01:46 | sender's name, that is to say, their
username on the Drupal site, which they
| | 01:50 | can change if they like, their e-mail
address, again they can change that and
| | 01:55 | the subject and message which they
would fill in. I will just say, Feedback on
| | 01:59 | the site. It looks great! They have an
option to send themselves a copy if they
| | 02:05 | like so that they can remember
exactly what they have sent to the
| | 02:08 | administrators and then send e-mail
and it's done. They get a message that
| | 02:11 | confirms that their message has been sent.
But we only have one contact form here.
| | 02:16 | Let's say that you have a large
organization and one person handles the website
| | 02:20 | and another one handles enquiries in
to the business and so forth. Let's go
| | 02:24 | back and add one. Since we are a
real estate company, we will add one for
| | 02:28 | Property information. Go to contact
form, Add another category, We will call
| | 02:33 | this Property information. For
recipients, we will add several people, we will
| | 02:38 | say, it should go to admin@
example.com, but it should also go to
| | 02:43 | properties@example.com. To add more
than one address, you put a comma in
| | 02:48 | between them and then in this case we
will have an auto-reply that says, Thanks
| | 02:53 | for your message. Again, we will
ignore Weight, but we will say Selected as
| | 03:00 | Yes. That's going to make this the
default, that shows up when people go to
| | 03:03 | that contact form and click on Save.
Now we have two separate contact forms.
| | 03:09 | Let's take another look at what the
user would see. Here we are again. It has
| | 03:14 | the name and the e-mail address of the
sender. They enter a subject. Here you
| | 03:17 | will see an additional choice, which is,
which Category does this message fall
| | 03:21 | into? Is it Website feedback or
Property information? Since we had Property
| | 03:26 | information as the default, it shows
up as checked and then the person would
| | 03:29 | enter their message and do exactly as
they did before. So far, so good. But
| | 03:34 | there is one more thing we have to do
to make it so that members can actually
| | 03:37 | use this form. Go to Administer,
scroll down to Permissions and then scroll
| | 03:43 | down to the contact module. We have
to make sure that authenticated user is
| | 03:48 | allowed to access the site-wide
contact form. If not, it does no good; they
| | 03:53 | simply can't reach it. You could also
add other roles that are permitted to
| | 03:56 | send e-mail this way by clicking in
their boxes, in this case we added a type
| | 04:00 | of roll called Contributing user.
We could add them if we wanted.
| | 04:04 | You could allow anonymous users to send
e-mail via the contact form by clicking
| | 04:08 | here. Personally, I would recommend
that you not do that because that opens the
| | 04:11 | door to abuse from people who haven't
actually signed up on your site. If they
| | 04:16 | to want to, they could send many,
many messages or abusive messages and you
| | 04:19 | would have no way of knowing who they
are, since they haven't signed up. We
| | 04:22 | will leave that unchecked for now.
Once you have done that, scroll to the
| | 04:26 | bottom and Save your permissions.
| | 04:30 | Let's take a look at what this would
like to an ordinary user. To do so, we are
| | 04:34 | going to switch over to Firefox, where
I have already logged in as fishyjoe,
| | 04:39 | who is an ordinary user and not an
administrator. Once again, they would go to
| | 04:44 | Contact and they see pretty much the
same thing that the administrator saw.
| | 04:49 | There's the pop up. Send yourself a
copy, all the other options. There is one
| | 04:54 | other thing that happens to ordinary
users though. When you turn on the contact
| | 04:58 | module, they get an individual
personal contact form, which allows other
| | 05:02 | members to send e-mail to them. They
can turn that off, if they like, by going
| | 05:06 | to My Account, Edit and unchecking the
checkbox Personal Contact Form. In this
| | 05:15 | case, fishyjoe wants to receive e-mail
from other members, so we will just say, Save.
| | 05:19 | There is one more thing we could do to
make this easier for all the members. We
| | 05:23 | are going to put a link up in the right
hand corner that says Contact Us, that
| | 05:27 | leads back to the administrator's
contact form. To do that, we will go back to
| | 05:31 | our Administrator interface, go to
Administer and then to Menus. You can add
| | 05:37 | that link to any one of the menus, the
Navigation menu is over here on the left
| | 05:40 | hand side, Primary and Secondary links
are up here in the right hand corner in
| | 05:45 | this theme. We are going
to add it to Primary links.
| | 05:48 | There is another video about Adding
menus, which goes in to this function in
| | 05:52 | greater detail. But for now, we will
just say Add item, we wanted to go to the
| | 05:57 | contact page and the link title should
be Contact Us. For description, let's
| | 06:03 | just say, Tell us what do you think! We
will ignore these other options for now
| | 06:08 | and click on Save. There, we have added
the link. Remember that description, if
| | 06:13 | you hover above it, it gives you that
description as a little tip. Now for
| | 06:18 | anybody who clicks on that link, they
go straight to the Administrator Contact page.
| | 06:22 | Contact forms are great for
providing a venue for customer service and
| | 06:25 | increasing visitor engagement in your
site. They have one other advantage over
| | 06:29 | plain e-mail addresses that might show
up in your site, which is that, if you
| | 06:33 | that, it opens the door to abuse
because many spammers will just scrape it from
| | 06:37 | your website and send massive amounts
of spam and abuse to that address. So
| | 06:41 | Contact forms avoid that by forcing all
members who want to send you messages,
| | 06:45 | to go through this form interface.
| | Collapse this transcript |
|
|
7. Establishing Your Site's IdentityCreating your site's basic info pages| 00:00 | So we have a Drupal website that's up
and running fine but we don't have any
| | 00:04 | content on it yet. And in fact up
until now we have just had this main page
| | 00:09 | which says "Welcome to you new Drupal
website!" on it. This page gives you a
| | 00:13 | four step program of how to build your
website and we have gone through many of
| | 00:17 | these steps already. Now it's time to
start adding content. To do so click on
| | 00:23 | Create Content and you are given a
choice between Page and Story. These two are
| | 00:27 | very similar and we will discuss the
differences between them but for now we
| | 00:31 | are going to create the homepage for
the site and that's going to be a page so
| | 00:35 | we click on Page and
enter all of this information.
| | 00:39 | We have created some exercise files for
you. If you are a premium subscriber to
| | 00:43 | lynda.com or received this course on a
disk, you have these exercise files. We
| | 00:47 | are going to go there now and get the
information that we need for this page.
| | 00:51 | To do that we go back to the Finder,
Hide everything in the folder Exercise
| | 00:56 | Files, Chapter07, section 01, and here
in basic-info.txt is the text that we
| | 01:03 | are going to enter in this page.
| | 01:04 | There is our title. I am going to copy
it with Command+C or Ctrl+C on the PC.
| | 01:11 | Go back to our browser and paste it in
the Title area and go back and paste our
| | 01:17 | BODY in. that's really all that you
need to create a page, a title and
| | 01:24 | something in the body and in fact the
body is optional although usually you
| | 01:28 | will have one of course.
| | 01:29 | Let's look at some of the other options
on this page as well. If you want this
| | 01:34 | page to appear in a Menu that is along
the left-hand side or up here on the top
| | 01:38 | with the other menus, you can do so by
clicking on Menu settings deciding what
| | 01:42 | sort of title you want it to be. Up
here for example, the title is Contact us
| | 01:47 | and where you want it to appear. We
will talk more about menus in another video
| | 01:51 | and for this content we are not going
to have a link so we will close that up.
| | 01:56 | Continuing down, Input format changes
whether it's being entered as Full HTML a
| | 02:02 | limited subset of HTML or many other
input formats that are available. One of
| | 02:07 | the other formats is PHP, which I will
also show you how to enter in another
| | 02:11 | video. For now we are
just going to use Full HTML.
| | 02:16 | Revision information allows you to
create a new revision every time you change
| | 02:20 | this page. Personally, I recommend
doing this and I recommend having that as
| | 02:24 | the default setting. I am going to
click it now, and in the Log message I will
| | 02:29 | just say Created page.
| | 02:31 | The reason I suggest this is that if
you make many changes and especially if
| | 02:35 | there are many people making changes on
the website, you want to keep track of
| | 02:39 | who did what and when something changed
and then be able to roll back to those
| | 02:42 | earlier changes if you decide to do that.
| | 02:46 | Continuing down this is going to be
our homepage and we don't really want to
| | 02:49 | have comments enabled. That is we
don't want our users to be able to say, oh
| | 02:53 | yeah that's right, oh that's wrong. So
I will click there and yes it's already
| | 02:57 | on Disabled.
| | 02:59 | Authoring information, if there are
other users on the system you could change
| | 03:03 | who wrote it or at least who appears
to have written it. In this case we will
| | 03:07 | leave it as admin. Similarly, you can
change the date on which it appears to
| | 03:11 | have been written. Finally, Publishing
options. There are three options here.
| | 03:16 | Published should always to be checked
if you wanted to appear on your site and
| | 03:20 | by default every content type
has Publish already checked.
| | 03:24 | Promoted to front page, lets you say
whether it's going to appear on the
| | 03:27 | homepage in addition to other places
that it might appear on the site. In this
| | 03:31 | case since we want it to be a homepage,
piece of information we are going to
| | 03:35 | say, promote it to homepage. Finally
since this is really our center piece for
| | 03:40 | our site that is it appears as the
welcome page we do want it Sticky at top of
| | 03:45 | lists.
| | 03:46 | It might not be clear to you exactly
what that means at that point but it will
| | 03:49 | become more apparent as you add more
content. Essentially it means that if
| | 03:53 | there is a series of content on a
single page, this one will always be at the
| | 03:57 | top. And again since this is our
homepage, we are going to say yes we want that
| | 04:01 | at that top. Then we say Save, good.
The page has been created as you can see.
| | 04:06 | If you want to go back and edit it, all
you need to do is click on Edit and you
| | 04:10 | can go back and do the same sorts of
things. This Split summary at cursor, we
| | 04:14 | will be discussing at another point.
It's really for a longer stories and not
| | 04:18 | relevant here. Let's go back to View,
we still see our piece of content there.
| | 04:22 | Now remember how we promoted it to the
front page, let's go back to our front
| | 04:26 | page by clicking on the logo here and
there it is. It's on our front page and
| | 04:31 | the original text that was there that
said here is how you create your site is
| | 04:35 | gone. That text disappears whenever
you first promote something to the front
| | 04:40 | page.
| | 04:41 | This page is still little bit boring.
So I am going to add a graphic. After all
| | 04:44 | it is our front page. To get there,
I will go back to the Finder and hide
| | 04:48 | everything. I will go into the Exercise
Files and find the file I want which is
| | 04:55 | this one called House-Underwater. Again,
if you have received the Excise File
| | 04:59 | it's in that folder.
| | 05:00 | Now I am going to go to where I have my
Drupal directory. For me that's in the
| | 05:04 | Hard Drive, Users, tomgeller, sites
and Drupal. Although of course your
| | 05:10 | directory could be anywhere on your
drive and for PC users, it's certainly in a
| | 05:14 | different place. The directory we want
to put this in since its specific to the
| | 05:18 | site is sites, default, files.
| | 05:22 | I will go back there and I copy that
file over by hitting Command+C or Ctrl+C
| | 05:28 | on the PC and clicking in this
directory and Command+V or Ctrl+V on the PC,
| | 05:34 | there. I am going to copy the name of
this file by highlighting it and on the
| | 05:39 | Mac I say Command+A, Command+C to copy
it. That will just make it a little bit
| | 05:43 | easier to enter when I go back
into Drupal, which I will do now.
| | 05:47 | Go back into Drupal and I want to edit
this piece of content. To do so click on
| | 05:51 | the Title and then go to Edit. Here we
have to enter a little bit of HTML. The
| | 05:56 | HTML to enter to add this graphic is
(img src="/sites/default/files --and
| | 06:09 | remember that was the path to get to
that file, and then / the name of the file
| | 06:13 | itself, end your quotes
(") and end your bracket ()).
| | 06:16 | Now let's go down and take a look and
see if that took. Save it there it is.
| | 06:21 | However it's not quite right. We are
going to do one more small change to the
| | 06:25 | HTML. To do so click on Edit and here
we are just going to say align="right"
| | 06:32 | hspace= "10". This will make the
graphic appear to the right of the text and
| | 06:41 | make the text wrap around it.
| | 06:43 | Further it will add a little bit of
space between the graphic and the text, so
| | 06:46 | it will be a little bit more attractive.
Let's scroll down to the bottom and
| | 06:51 | there we have it. We go back to our
front page just to see what it looks like.
| | 06:55 | Looks a lot better. That's how you
would set up the front page to your website.
| | 06:59 | You could create other static pages
just as easily and pepper them throughout
| | 07:03 | your site. The main difference in this
case is that you have promoted this page
| | 07:06 | to the front page and then again made
it sticky so it will always be on the top
| | 07:10 | of the front page.
| | Collapse this transcript |
| Understanding page layout| 00:01 | If you have looked through a number of
Drupal sites you've probably noticed the
| | 00:04 | amazing variety of appearance among
them. But behind the scenes, they all
| | 00:08 | conform to certain layout principles
that are common to all of them. In this
| | 00:12 | video, you'll gain knowledge about
those principles that will help guide you as
| | 00:15 | you plan your own site's design. To
show some variety and similarities among
| | 00:19 | themes, we are going to go to this site,
themegarden.org. We start off here at
| | 00:24 | the Garland theme; you recognize it
because it's the theme that we have been
| | 00:27 | using for our site.
| | 00:29 | You'll notice a few things about this
theme. For one, there is a column on the
| | 00:32 | left, a column on the right, and a
center content area. That's the typical
| | 00:37 | setup for a Drupal site; however,
there are some that have only two columns.
| | 00:42 | For example, the next one on this site
called GlossyBlue. Here you have only
| | 00:46 | the one right hand column. However, it
still has all of the same content as you
| | 00:50 | had in Garland. Let's go back to
Garland and see how that works. In the left
| | 00:54 | hand column you have Previous theme,
in the right hand column you have Next
| | 00:58 | theme, and Random theme.
| | 00:59 | Again, let's go back to GlossyBlue;
here all of the information has been
| | 01:03 | smooshed into one column. Which is
Next Theme, Previous Theme and then down
| | 01:07 | here we have Random Theme. That's
one difference you have among themes in
| | 01:10 | Drupal. There are three other main
differences; the first one is fluid width
| | 01:16 | columns versus fixed width Columns. To
demonstrate this, we'll go back to our
| | 01:20 | site, the underwater realty site. We
are going to Administer, and from there
| | 01:25 | into Themes. Right now we have only
one theme turned on, that's Garland; this
| | 01:30 | is a fluid width theme. However, there
is a similar one called Minnelli, which
| | 01:34 | is fixed with theme.
| | 01:36 | We'll turn that on and make that the
default to show you the difference. Save
| | 01:40 | configuration and we're now in Minnelli.
As we change the size of the window,
| | 01:45 | you'll notice that the text in the
middle does not change at all. This text
| | 01:49 | here, it gets cut off, as you move the
side of the window in. Now let's switch
| | 01:54 | back to Garland. Go back to Administer
and Themes. Change the default back to
| | 01:59 | Garland and click on Save. Now as we
move the window in and out that center
| | 02:04 | part is fluid. That's what
they mean by a fluid width column.
| | 02:09 | The second difference among the Drupal
themes is whether it's configurable in
| | 02:13 | terms of color. We are on Garland right
now, and this is one of the few themes
| | 02:16 | that is configurable by color. More
and more themes are talking advantage of
| | 02:20 | this feature; let's take a look at it.
Click on Configure and click on the
| | 02:25 | Garland theme. Aha! We see this color
wheel here. If we want to change the
| | 02:30 | color of the entire site, all we
have to do is change the color set to
| | 02:34 | something we like better.
| | 02:35 | Let's say Belgian Chocolate. Ah! And we
get a preview down here. Scroll all the
| | 02:40 | way down to the bottom and click on
Save Configuration. There, our whole site's
| | 02:46 | look has changed, just by color. You
can also change individual colors; for
| | 02:50 | example, the link color, let's change
that to something more red like. Scroll
| | 02:57 | to the bottom again and Save and you
see how the links have now changed to red.
| | 03:01 | We're going to go back to our blue
lagoon default, and again scroll to the
| | 03:05 | bottom, and Save.
| | 03:08 | The final main difference among Drupal
themes is whether they are table based
| | 03:12 | or CSS based. You don't need to worry
about this distinction generally. Fewer
| | 03:17 | and fewer themes are table based, and
the differences mostly have to do with
| | 03:20 | maintenance and modification of the
theme itself. If you are not going to make
| | 03:24 | extensive changes to your theme,
don't worry about it except to know that
| | 03:28 | CSS-based or table-less themes are more
in fashion these days and they tend to
| | 03:33 | be somewhat more flexible and
appear a little more consistently from
| | 03:36 | browser-to-browser.
| | 03:38 | The distinction is a source of long
debates, and we won't get into those
| | 03:41 | debates here. We've seen some of the
differences among Drupal themes; now let's
| | 03:45 | talk about some of the things that are
the same in all of them. For one, as we
| | 03:50 | go back to our homepage the title
remains at the top, generally speaking. If
| | 03:55 | there is a slogan or a mission statement,
it has a place somewhere up near the
| | 03:59 | top. Here we have the slogan showing
up pretty much at the same parity as the
| | 04:03 | title. If we change our theme, however,
to Blue Marine, we'll notice that it's
| | 04:08 | put in a slightly different place
and at a slightly different level.
| | 04:12 | See, it's smaller and underneath the
title. We're going to switch back to
| | 04:17 | Garland, just to keep everything clean.
We're also going to uncheck these other
| | 04:23 | themes, once again, just to keep our
installation clean. And scroll to the
| | 04:27 | bottom and click on Save Configuration
and we're back at Garland. Finally, we
| | 04:32 | should talk a bit about the layout of
the page in general. To see this, we'll
| | 04:35 | go to Administer and Blocks. In the
blocks page, you can move things, for
| | 04:40 | example, like the Administration
Menu from the left column, to the right
| | 04:44 | column, to the top, and so forth. The
good thing about this block's page is it
| | 04:48 | gives you a visual indicator of where
the various areas of your theme are.
| | 04:51 | Here in Garland we have a header up
here. We have a right and left sidebar,
| | 04:55 | which are indicated here, and we have
two other areas as we scroll down. The
| | 05:00 | content area, which is the main area in
here, and the footer, which is where we
| | 05:04 | have our copyright notice and so forth.
Not every theme will have exactly the
| | 05:09 | same areas. However, most of them
have those five areas, unless it's a
| | 05:13 | two-column theme with just
content in a right or left column.
| | 05:16 | So you can see that, Drupal is not,
perhaps, as flexible and straight ahead
| | 05:20 | HTML although, of course, it is easier
to maintain. It insists on certain zones
| | 05:25 | in the page, but these zones are quite
flexible. Even if you don't get deeply
| | 05:29 | into the complex world of theme
development, a brief understanding of how
| | 05:33 | Drupal uses these theme to layout it's
pages, will help you design a page that
| | 05:37 | flows the way that you want.
| | Collapse this transcript |
| Creating a flexible layout with blocks| 00:01 | One way that you can change the look
and function of your Drupal site without
| | 00:04 | changing the theme is to use a feature
called Blocks. Blocks let you put text
| | 00:09 | or graphics, or even dynamic content
at various points in the pages. For
| | 00:13 | example in the left column, right column,
top, or bottom. To use Blocks, first
| | 00:18 | go to Administer and then Blocks.
Here you have a list of various blocks,
| | 00:23 | including those that are built into
Drupal and are turned on by default. In
| | 00:29 | this case, in the Left sidebar we see
the User login and the Navigation Bar.
| | 00:33 | The User login only shows up when
somebody is logged out. So we'll log out here
| | 00:38 | and see what that looks like, here is
the User login and we are going to login
| | 00:42 | again.
| | 00:44 | Let's go back to Blocks now. As you
go down, you see that the blocks are
| | 00:48 | divided into various zones, the Left
sidebar, Right sidebar, Content, Header,
| | 00:54 | Footer. And as you look around the
page, you see that these are graphically
| | 00:57 | shown, Header up top, Left sidebar,
Right sidebar, and so forth. At the bottom
| | 01:02 | of the list of blocks are those that
are not showing up on the page at all. You
| | 01:06 | can move these into any of the above
areas by either clicking on this arrow
| | 01:10 | symbol and dragging it into the area.
I am going to drag that back now or by
| | 01:17 | grabbing this drop down menu and choosing
the area where you want that block to appear.
| | 01:22 | Whenever you make a change, even if
you drag it back to its original place
| | 01:26 | there is a note that says that the
changes will not be saved until you click on
| | 01:30 | Save Blocks. The block layout on a
page is specific to the theme, let's go to
| | 01:36 | administer themes and see how that
works, Administer and Themes. Right now we
| | 01:42 | only have one theme enabled - the
Garland theme. But let's say we also have
| | 01:46 | Blue Marine available to us, we'll
enable that and click on Save Configuration
| | 01:52 | and then go back to Administer and
Blocks. Now you'll notice we have a choice,
| | 01:56 | Garland and Blue Marine up here. If we
make a change in Garland, let's say we
| | 02:01 | disable the Powered by Drupal badge
that appears at the bottom of the screen,
| | 02:04 | by dragging it down here.
| | 02:06 | Scroll to the bottom, click Save
Blocks, and then we switch to Blue Marine.
| | 02:11 | Aha! Powered by Drupal is still
showing up in that footer. Let's go back to
| | 02:16 | Garland and put it back. So remember,
if you make a change in where blocks
| | 02:19 | appear, you have to make that change to
whatever theme is going to be active on
| | 02:23 | your site. I am going to go down and
just return this to the footer and click
| | 02:29 | on Save Blocks. There are three types
of blocks, which you can see in this list
| | 02:34 | here. The first kind comes built-in
automatically with Drupal. We already
| | 02:39 | mentioned these - the User login block,
Navigation block, the Powered by Drupal
| | 02:43 | block, which you can see at the bottom
of the page by default, is the one right
| | 02:47 | down here.
| | 02:48 | A second kind of block appears only
when it's installed by a module, let's go
| | 02:53 | ahead and do that. We'll go back up to
Administer and Modules and then turn on
| | 03:00 | the blog Module. As always, we go down
to the bottom of the page, click on Save
| | 03:04 | configuration and then we'll go back
to Administer and Blocks. As we scroll
| | 03:09 | down, we'll notice a new entry in this
list, Recent blog posts. If we drag that
| | 03:15 | up to the right hand side bar, then
whenever somebody on the site has added a
| | 03:19 | blog post that will appear in the
right hang column. We don't have to do that
| | 03:22 | now, so we'll just leave it
at none and save our blocks.
| | 03:26 | The third kind of block that appears
in this list is that which you create
| | 03:29 | explicitly by clicking on Add Block.
I'll give you an example of this by going
| | 03:33 | to my own website, savemyhomebook.com.
Up in the left hand corner, we have a
| | 03:38 | custom made block because I didn't like
the way that it just showed, Admin and
| | 03:41 | then there was a separate Logout link.
I wanted to bring it all together into a
| | 03:45 | one link. So I created this using some
PHP code, so it says Logout Admin. This
| | 03:50 | is a custom block out here, and we
could actually go and take a look at the
| | 03:54 | code to see how that works. By the way
I got that code off of the drupal.org
| | 03:58 | website, in the Code Snippet section,
but let's go back to our site for now.
| | 04:02 | If we want to add such a block, we
would click on Add Block. The block
| | 04:06 | description we'll call Promotions, the
blog title is also Promotions and in the
| | 04:12 | block body we'll say, Buy two houses,
get one free. Now let's continue on and
| | 04:17 | take a look at all the options you have
when you add a block. First of all, as
| | 04:21 | when you add content you can choose
the input format that you use. We'll just
| | 04:25 | use filtered HTML, since Plain Text
works just fine there. You also can choose
| | 04:31 | what users will see this block and on
what pages that block will be seen. You
| | 04:36 | can choose specific roles that will see
that block. So for example, it might be
| | 04:39 | a block that helps people edit pages,
but you only want people who are able to
| | 04:43 | edit pages to see that block.
| | 04:45 | Well of course you could check or
uncheck the roles that are appropriate. You
| | 04:48 | can change whether or not users can
choose whether to see that block or not. So
| | 04:52 | for example, you could say they
cannot control weather they see this block.
| | 04:56 | That will always show the block, and
they won't have any choice on it. If you
| | 04:59 | say, show it by default but let them
hide it or hide it by default and let them
| | 05:03 | show it, then they can change that by
going to their user page and change it in
| | 05:07 | their profile with check boxes.
| | 05:09 | Finally, you could decide on what
pages you want that block to appear. For
| | 05:13 | example, you might want a block to
appear on every internal page but not on the
| | 05:17 | homepage. In which case you would fill
out the appropriate fields here and list
| | 05:21 | the pages that you didn't want it to
appear on here, including PHP code. We are
| | 05:26 | going to have it show on every page, so
we'll say Save Block. Now we look down
| | 05:31 | our list of blocks and we see under
disabled, we have our new block called
| | 05:35 | Promotions. Whenever you create a new
block, it always starts out as disabled
| | 05:40 | that is, it's not automatically put on
your page. We want that to be, let's say
| | 05:44 | in the Right Hand column. So we'll do
that and go back down to the bottom and
| | 05:49 | click on Save; and there it is, it
now shows up in the Right Hand Column.
| | 05:54 | Let's go back to homepage to see
exactly how that looks. Tada! We now have our
| | 05:59 | custom made block in the right hand
column and nothing else on the page has
| | 06:03 | changed. Blocks are one of Drupal's
most powerful features, especially if you
| | 06:07 | use them to show dynamic content such
as the latest comment or blog post. Like
| | 06:11 | many powerful features, however, it's
easy to overuse them and make your site
| | 06:16 | hard to navigate by throwing every
block on to the page, but judicious use of
| | 06:21 | blocks, can really improve ease at
navigation and improve user engagement.
| | Collapse this transcript |
|
|
8. Keeping Your Drupal Site RunningMonitoring performance| 00:01 | Even when your site seems to be up
and running smoothly it's a good idea to
| | 00:04 | take a look at a few things to now
then to make sure that you are not missing
| | 00:07 | an important software update or a
broken site component. Fortunately, Drupal 6
| | 00:12 | includes some handy ways to check for
common issues through its administrative
| | 00:16 | interface, specifically, under the
Report section. We are going to go there by
| | 00:20 | clicking on Administer, and then
scrolling to the bottom, and Reports.
| | 00:25 | The first one is Recent Log Entries.
This will show you all of the unusual
| | 00:30 | things that have happened on the site
and by unusual, I mean it doesn't show
| | 00:34 | you every time somebody accesses a page
but rather if a cron run has completed,
| | 00:39 | or if somebody searched for a
page that wasn't there, or so forth.
| | 00:44 | There are several things you can do to
make this page easier to understand. For
| | 00:47 | one thing, you can sort based all the
various criteria in this table. Click on
| | 00:52 | Type for example and it sorts
according to the type of action that happened.
| | 00:56 | Click on Date and it shows it to you
either reverse chronological order or in
| | 01:02 | forward chronological order and so
forth; you can also sort by User.
| | 01:06 | Secondly, you can filter based on the
sort of log message that you want to see.
| | 01:10 | I like to filter by Severity. In our
case we don't have any emergencies that
| | 01:15 | have happened on our site yet for
which we are very lucky or alerts are
| | 01:19 | critical, but if you look at the
warnings and click on Filter, you will then
| | 01:22 | see all the sorts of warnings we have gotten.
| | 01:24 | This kind of thing can be useful if you
want to see if there are patterns. For
| | 01:28 | example, do people keep searching for
certain things and getting bad page. Are
| | 01:32 | they trying to reach pages that don't
exist? That could be a sign of a link
| | 01:36 | that doesn't work, for example. Let's
go back and see our entire log though by
| | 01:40 | clicking on Reset and there we are.
| | 01:42 | You will notice that there is
Operations column down here. Only some of the
| | 01:46 | items in the log have this View link
here. Click on it and you will get more
| | 01:51 | information about the Operation that
caused the log entered to appear and we
| | 01:55 | can go back just by clicking
on our browsers Back button.
| | 01:58 | Finally, we can click on any one of
these messages and get more information.
| | 02:03 | For example, where exactly the person
was and where they had come from. All of
| | 02:07 | this information appears just on one
page and again we can go back by clicking
| | 02:11 | on our browser's back button. There
are other reports available as well,
| | 02:15 | besides this general log. Click on
Administer and again we could scroll down to
| | 02:20 | Reports or just click on Reports here
and go to Top Access Denied Errors. In
| | 02:25 | this case, we don't have very many, but
we could see where somebody was trying
| | 02:28 | to go and was denied access.
| | 02:31 | The third kind of Report is the Page
Not Found error. Again, we see what, sort
| | 02:35 | of, page they were trying to reach;
in this case perhaps somebody had their
| | 02:38 | catwalk on the keyboard.
| | 02:40 | The fourth kind of report is Available
updates. Right now, everything that we
| | 02:44 | have is up-to-date, but if it weren't
instead of seeing green and up-to-date up
| | 02:48 | here, you would see it in red and it
would tell you exactly how to get the
| | 02:51 | update that you need.
| | 02:53 | You can check manually at any time by
clicking on this link here. Incidentally,
| | 02:57 | after you have installed some
contributed modules they'll be included in this
| | 03:01 | page and this page will get longer
and longer as your site becomes more
| | 03:04 | complex, but don't worry because it
all appears in one place and by clicking
| | 03:08 | Check manually, it checks for all
of the modules you've downloaded.
| | 03:11 | Let's also take a look at the Settings
here. Drupal will automatically check
| | 03:15 | for updates both for the core and for
contributed modules on a schedule that
| | 03:19 | you define. You can choose to have it
check either Daily or Weekly and then
| | 03:23 | have it tell you about All New Versions
or only those one that are going cause
| | 03:27 | a security problem if you don't
upgrade. Further, if you want to, you can
| | 03:31 | specify an email address to mail
you whenever one of those updates is
| | 03:35 | available. That's very useful for
system administrators who are managing may
| | 03:38 | sites. We'll just keep it the way that
it is and click on Save Configuration.
| | 03:43 | The last kind of report is the
Status Report and this is perhaps the most
| | 03:47 | useful page of all. It includes the
status of all of the important parts of
| | 03:52 | your Drupal system, whether or not
all of the components are working, for
| | 03:55 | example; the last time that cron was
run and by the way if you have any trouble
| | 03:59 | setting up cron, I strongly recommend
coming back to this page once in while
| | 04:03 | and making sure that cron is actually
running because it will tell you how long
| | 04:07 | ago it's has been since cron was run.
It should be at least once an hour in my
| | 04:11 | opinion depending on how you set it up.
| | 04:13 | The Status report page includes
several links that can also be helpful. For
| | 04:17 | example, we see here that on MySQL
database is this version 5.0.41. If we click
| | 04:23 | on that version number, we get more
information about that SQL database. This
| | 04:28 | is probably more than you need unless
you are an SQL administrator, but it's
| | 04:31 | good to know that you have it.
| | 04:33 | You have other means besides these
pages to make sure Drupal is running well.
| | 04:36 | For example, the logs on your system or
a third-party monitoring system such as
| | 04:41 | Google Analytics. Further, there are
several Drupal modules available from
| | 04:46 | drupal.org, which remains, as always,
your best source for such information.
| | Collapse this transcript |
| Recovering from disasters| 00:00 | The wise designer builds for the best,
but plans for the worst. This video will
| | 00:05 | show you a few tricks to get the site
up in running if you encounter a few
| | 00:08 | common, but very easy fix, problems.
First of all, we have to repeat, your best
| | 00:14 | defense is to back-up to both the
Drupal files and the site database regularly
| | 00:18 | and be sure you know how
to restore from a backup.
| | 00:21 | We will tell you how to do that in two
separate videos in this series. Backing
| | 00:24 | up your Drupal site and restoring your
Drupal site from backup, but deleting
| | 00:29 | and restoring your site is really an
atom bomb, sort of, option; it destroys
| | 00:32 | everything and then tries to recreate
it. Let's look at some other ways to
| | 00:36 | recover from disaster at times when you
don't need to restore the entire site.
| | 00:40 | The first one is let's say that you
have taken the site off-line and I will
| | 00:44 | show you how to do that by going to
Administer, scroll down to the bottom, and
| | 00:50 | click on Site maintenance, and then
take the site Off-line like this, and Save
| | 00:54 | configuration. Good and then let's say
that you accidentally log out, oh! Oh!
| | 01:00 | The site is off-line and there is no
place that I can go to to log in. There
| | 01:04 | are no login boxes here.
| | 01:06 | Well, we can enter a little code up
here which is ?q=user. That's the log in
| | 01:14 | page and from there you can do admin,
and your password, and there we are, we
| | 01:21 | are back in. Now if you do that the
first thing you should do is go back to
| | 01:24 | Administer, and down to the bottom at
Site maintenance, and put it back Online
| | 01:29 | if indeed you want it to be Online
for everybody; and of course Save
| | 01:33 | configuration as always.
| | 01:35 | Let's say you are having some other
problems, like you feel that you should be
| | 01:38 | able to get to a page but you can't
get there. The first solution is the
| | 01:41 | obvious one; are you logged in as the
administrator or are you logged in as the
| | 01:46 | correct person. If, for example, one of
your editors has two or three different
| | 01:50 | accounts, they have to make sure that
they are logged into the account that
| | 01:53 | gives them the permissions they believe
that they should have, but it may also
| | 01:56 | be an issue on the administrator's
side and here I will give you an example.
| | 02:00 | I am going to switch over to Firefox,
where I am logged in as ordinary user
| | 02:04 | fishyjoe and let's say that you have
talked with fishyjoe and said, "Hey! Yeah
| | 02:07 | I like your ideas, why don't you put
them in a blog post?" and fishyjoe says,
| | 02:11 | "Okay," I will go down to Create Content.
"Wait, there is no place to create a
| | 02:14 | blog post, it is just Pages and
Stories why can't I do that? And you as the
| | 02:18 | administrator say, "Well I know that I
enabled that module". Let's go back and
| | 02:21 | take a look. Go in to Administer and Modules
and indeed it's enabled why isn't it working?
| | 02:29 | Well let's find out by going
Administer and By modules and we see Blog. Ah!
| | 02:34 | That's right the Permissions. So let me
check those Permissions, go back up to
| | 02:38 | Blog, we didn't allow people of his
user level to create blog entries. So we
| | 02:43 | will check that. We scroll down to
the bottom, click Save Permissions. Now
| | 02:49 | let's go back and see if fishyjoe can
actually create blogs. Click again on
| | 02:53 | Create Content and there is our Blog Entry link.
| | 02:57 | A third kind of error occurs when
the administrator knows that they have
| | 03:01 | downloaded the module that they want to
enable, but has forgotten to enable it.
| | 03:06 | Let's go back to our administrator
interface and see what that looks like.
| | 03:09 | Click on Administer and Modules and
as you could see you first need to make
| | 03:15 | sure that it's enabled. It may just be
something as simple as checking a box,
| | 03:19 | but once you have done it, of course,
you go down to the bottom and you say
| | 03:22 | Save Configuration, but there is more
to it than that. Click on Administer and
| | 03:26 | I will show, then go to By module.
| | 03:29 | Some modules have more than just one
configuration screen and in fact as you
| | 03:33 | download more and more modules you
will see that some have as many as four of
| | 03:36 | five administration screens each with
their own peculiarities and maybe even
| | 03:41 | multiple permissions. You have to go
through the module, read the manual, and
| | 03:45 | see exactly what has to happen
in order to enable that module.
| | 03:50 | Finally, you might have a problem with
an individual page and let's go back to
| | 03:53 | our homepage to give an example of that.
Here we have the front-page content
| | 03:58 | and this is stored as a page. We are
going to edit that page and it looks fine.
| | 04:02 | We saw it on our front page, but let's
say that while were publishing this we
| | 04:07 | had an itchy finger and accidentally (ph
) unclicked Published and click on Save.
| | 04:10 | Then we go back to our homepage it's
disappeared; of course, it's disappeared
| | 04:15 | because it hasn't been published. One
way to find out what has and hasn't been
| | 04:19 | published is to go Administer, Content,
and then take a look along here. Click
| | 04:24 | on it, it says not published. You could
publish it again by just clicking there
| | 04:28 | and clicking on Update and Publish
there. And of course you can make other
| | 04:32 | changes such as promoting it to the
front page, demoting it from the front
| | 04:36 | page, and so forth. What I would
also recommend you do, if you are having
| | 04:39 | problems with any sort of content is go
into the content itself and Edit it and
| | 04:45 | look at all of the turned down
triangles; click on all of these little links
| | 04:49 | and see the options available.
| | 04:51 | Maybe something has been posted by
the wrong author and you need to change
| | 04:54 | that, or it's allowing comments when
you don't want or something like that;
| | 04:58 | just check them all and then click on
Save. What if you have something that you
| | 05:02 | can't solve through the administrative
interface? Then you might need to poke
| | 05:06 | around the database. We are going to
open up our SQL database by going to MAMP,
| | 05:12 | Open start page, and phpMyAdmin. WAMP
has a similar setup but your ultimate
| | 05:17 | goal is to get to phpMyAdmin.
| | 05:20 | We will go to the Drupal database. The
Drupal database has many, many tables.
| | 05:26 | We won't talk about all of them because
that's a very advanced subject, but we
| | 05:29 | will talk about one table that's very
useful to know which are users. We will
| | 05:32 | scroll down to users, click on this
icon to browse the users table; and as we
| | 05:37 | scroll down we can see all of the
different users were in the database. User 0
| | 05:42 | is a system user that isn't an actual
person who can log in, but all of the
| | 05:45 | others are. The admin who is the
superuser with user ID 1 and then the regular
| | 05:50 | users, fishyjoe and fishysue.
| | 05:52 | Let's say that the administrator
doesn't remember the password and he has
| | 05:56 | changed the email address so they
can't receive the password. Click on the
| | 05:59 | pencil icon and there is field here
called pass. To set a new password we
| | 06:05 | highlight that and delete it and enter
something else. We'll just say door and
| | 06:10 | then you need to choose a kind of
encryption, which for Drupal is usually MD5.
| | 06:15 | Scroll to the very bottom and then
click on Go and we have changed our
| | 06:20 | Password.
| | 06:21 | If we go back and take another look at
that password you will see it doesn't
| | 06:25 | show up as door. It actually shows
up as an encrypted string that's good
| | 06:30 | because it means someone can't just go
and look at the passwords if they get
| | 06:33 | into your database. They can change
them, but they can't look at them. I am
| | 06:36 | going to change it back to booth
and I am going to change this. So it's
| | 06:40 | encrypting and then, of course, Save.
| | 06:44 | The good news is you usually won't
have to poke around in the database like
| | 06:47 | this. If you forget your
administrator password and let's Log out of our
| | 06:52 | administrator, so we can see what's
it's like. All you need to do is say
| | 06:56 | Request new password and then enter
your Username or email address admin, Email
| | 07:01 | New Password and it sends you the new
password. If that email address isn't
| | 07:05 | working, however, you
have to go into the database.
| | 07:08 | Finally, some errors are very hard to
figure out; for example, you call up a
| | 07:12 | certain page and it simply doesn't
appear. One common problem is that your
| | 07:17 | php.ini file doesn't have enough memory.
We showed you how to change that in
| | 07:22 | the downloading, unpacking, and
installing Drupal video. They say you can build
| | 07:27 | a better mousetrap but nature will
just build a better mouse. Obviously, we
| | 07:30 | can't discuss all the ways your
mousetrap could break, but these few tricks
| | 07:34 | will get you out of lot of jambs.
| | Collapse this transcript |
| Improving administration skills| 00:01 | Most of this course has addressed
specific features of Drupal. Now, I would
| | 00:04 | like to give you a few additional tricks,
learnt from experience that will help
| | 00:08 | you administer your site well. These
are all optional, you can take them or
| | 00:11 | leave them, but I found them to be helpful.
| | 00:14 | First tip, for speed, I suggest
getting used to the exact URLs of the
| | 00:18 | administration pages. For example, we
go to Administer and of course we know
| | 00:22 | that is /admin. One of the more
common ones that you might use is let's say
| | 00:25 | Blocks that is /build/block.
| | 00:29 | All of the administration pages are
first by their category and then by their
| | 00:33 | name and after you have done this a
little bit you will see that your browser
| | 00:37 | will auto complete. So let's try that
I am going to localhost/admin/build, I
| | 00:43 | could just use my arrows up and down to
go to the one that I want. I find that
| | 00:47 | saves me a lot of time.
| | 00:48 | The second way that you could
quickly to go an area of the administration
| | 00:52 | interface is to click on Administer
and then instead of scrolling up and down
| | 00:56 | hit Command+F and just type in the name
of the thing that you are looking for.
| | 01:00 | For example, Contact form and in this
browser, which is Safari, it lights up,
| | 01:04 | so it's very easy to find
and then you can click on it.
| | 01:06 | The third tip is to sign up as another
user and then leave that user logged in,
| | 01:11 | in a different browser entirely.
So here we are in Safari with the
| | 01:14 | Administrator logged in, but I am also
logged in as an ordinary user, fishyjoe,
| | 01:20 | in Firefox. This is good because it
shows you exactly what the site looks like
| | 01:24 | from the outside. It's easy to get
tunnel vision as the Administrator.
| | 01:28 | The fifth tip is to follow the twin
laws of sufficiency and necessity. By that,
| | 01:32 | I mean add only those modules and
features that you think you are going to use
| | 01:36 | and then leave it alone. Try to avoid
the temptation to overload your site with
| | 01:40 | features that ultimately will
complicate matters. However, if you do need a
| | 01:44 | certain feature or a certain theme or
something else like that don't be shy to
| | 01:47 | add it.
| | 01:48 | For my sixth tip we will have to go
back to the Administration interface and
| | 01:52 | from there to Permissions, which I'll
find a way I just showed you by typing in
| | 01:55 | Find and Permissions and there we are.
Get to know this page and get to know it
| | 02:00 | well. So many times when something is
not working on your site it's because
| | 02:04 | Permissions actually haven't been set
correctly. It's a large page, but it
| | 02:08 | could be made easier if instead of
coming here you go to Administer By module
| | 02:14 | and then go to the Configure
Permissions you need for the particular module.
| | 02:17 | However, I do suggest going and taking
a look at the Permissions screen from
| | 02:21 | time to time just to make sure that
things are right. If anything goes wrong
| | 02:25 | you know you can usually fix it here.
| | 02:27 | My seventh tip, I have repeated time
and time again in the course, but it bears
| | 02:31 | repeating. If you ever have problems
or you need more information or you want
| | 02:35 | to stay in touch with the community go
to drupal.org, it's the centerpiece for
| | 02:39 | the entire community.
| | 02:41 | Finally, I can't stress this enough,
backup regularly and occasionally practice
| | 02:46 | restoring from your backups. A
backup is no good if you don't know how to
| | 02:49 | restore from it. Administering any
system can become a full-time pursuit for
| | 02:53 | the obsessive person. Fortunately,
Drupal doesn't usually require that much
| | 02:58 | attention, but the more time you
spend playing with it and touring the
| | 03:02 | resources on drupal.org
the better off you will be.
| | Collapse this transcript |
|
|
9. Building Content NodesUnderstanding nodes| 00:00 | More than design or structure, content
is what brings people to your site. That
| | 00:05 | content can be graphics, text, media
files such as movies, or even just links
| | 00:10 | to other sites. No matter what it is
Drupal encapsulates all contents into
| | 00:15 | units called nodes. We are going to
look at a few node types and explain how
| | 00:19 | Drupal handles them.
| | 00:21 | A node can be defined as the basic
unit of content in Drupal. For example, a
| | 00:25 | story, a page such as we have on the
front-page here on any other entry of a
| | 00:30 | content type. All nodes require a Title
such as this one here. They may require
| | 00:36 | a Body although that's not always
necessary and must have additional options
| | 00:41 | such as a check box that lets you
promote the node to your site's front page.
| | 00:43 | Let's take a look some of the options
in this node. We go to it by clicking on
| | 00:48 | the Title and then clicking on Edit and
we can go through and see there is our
| | 00:52 | Title, our Body. Here are some options
to make Menu settings. That's to create
| | 00:57 | a menu choice that will go directly
to the story. Going down further we can
| | 01:02 | change the Input format.
| | 01:04 | In this case we only have two options,
but the addition of other modules would
| | 01:07 | let you, for example, add PHP code and
perhaps some other type of input format.
| | 01:13 | Revision information, which will let
you save a different version every time
| | 01:16 | you make a change and so forth. Very
important is down here in publishing
| | 01:21 | options. If this Publish box is not
checked then it won't show up on your site
| | 01:25 | and it won't be public.
| | 01:27 | Now this particular node is a page,
but there are other content types. We can
| | 01:31 | see them by going to Administer and
then to Content types. We have three that
| | 01:37 | are enabled Page and Story came built
in with Drupal as part of the default
| | 01:41 | installation. Blog Entry we turned
on at another point in this series.
| | 01:46 | Let's see what it looks like from an
ordinary user's point of view. We are
| | 01:49 | going to switch to our ordinary user
who is fishyjoe and who has been launched
| | 01:52 | into this other browser Firefox. If
fishyjoe or any other user wants to Create
| | 01:57 | content they go down to this link
Create Content. They then have a choice of
| | 02:02 | several different types of content.
This is a list of all of the content types
| | 02:06 | from the previous screen in the
Administration interface that also have
| | 02:09 | permissions allowing this
particular user to enter that content type.
| | 02:13 | So, for example, not every user will
be allowed to enter a blog entry unless
| | 02:17 | you specifically say that they can. In
this case, let's have fishyjoe create a
| | 02:21 | blog entry. If you are a premium
subscriber to lynda.com or have received this
| | 02:26 | course on a disk, you will find the
Exercise file which has the text we are
| | 02:29 | going to enter here.
| | 02:30 | We are going to get that text now by
going to the Finder, hiding everything
| | 02:34 | else, and opening up our folder called
Exercise Files. In there, you will find
| | 02:38 | it in Chapter 9, video 1 called blog-
post; double click on that and there we
| | 02:44 | have it. I am going to copy this text
and paste it into the Drupal interface.
| | 02:49 | Command+C or Ctrl+C on the PC, switch
to other program, on the Mac by the way I
| | 02:53 | am doing that by holding down the
Command key and hitting Tab. Clicking the
| | 02:58 | Correct field Command+V or Ctrl+V to
paste it and then do it again for the
| | 03:02 | Body.
| | 03:09 | So this user has put in everything that
they really need to for the blog entry.
| | 03:13 | As we scroll down, we see we don't
have the all of the options we did in the
| | 03:17 | administrative interface, that's
because certain options are only available to
| | 03:21 | the administrator. We click on Save
and we have created a node, but where
| | 03:27 | exactly does that node show up?
| | 03:29 | Let's go back to the Administrative
interface and find out. I am doing that
| | 03:32 | again by holding the command key
and hitting tab. In the Administrative
| | 03:37 | interface you can see a list of all of
the nodes. No matter what their content
| | 03:41 | type by going up to Administer and
Content and there you have it and we even
| | 03:46 | have a little note here that shows
that it's new node that the administer
| | 03:49 | hadn't seen before.
| | 03:51 | If we click on it, we see the node
itself. As the administrator we can also
| | 03:55 | edit the node and the superuser,
that is User ID number one, the one you
| | 03:59 | created when you first set up
Drupal, can always edit all nodes. The
| | 04:03 | Administrator, as I mentioned before,
has additional options such as the input
| | 04:08 | format, comment settings, authoring
information, all of the things we discussed
| | 04:12 | earlier. I am going to just click Save.
| | 04:15 | So then I'll ask the question is
every page on a Drupal site a node, not
| | 04:18 | necessarily. Some types of pages that
aren't are the user pages. If you go up
| | 04:23 | to your site and then go to /user this
shows me the admin user page and if you
| | 04:29 | go back to the other person and say
user this is Fishyjoe's user page.
| | 04:34 | These are not actually nodes they are
built in to Drupal and are not handled
| | 04:38 | the same as Stories and Pages and blog-
posts. A second kind of page on Drupal
| | 04:43 | that's not a node are those that are
created through some process. For example,
| | 04:47 | Drupal has a module called
aggregator which will pull in news from other
| | 04:50 | websites throughout the Internet and
those news pieces are put into a page.
| | 04:55 | That page does not have a node ID.
That is to say it's not edited in the same
| | 04:59 | way.
| | 05:00 | Finally, pages that are created by
Drupal itself or are installed by modules,
| | 05:05 | those aren't nodes either, we will go
back to our administrative interface and
| | 05:09 | go to Administer this page that you
see here is not a node, again, it's built
| | 05:13 | directly into Drupal.
| | 05:15 | All nodes can be viewed as stand
alone pages and we'll see that by going to
| | 05:19 | Administer and Content and take
another look at this, "Can you help me find a
| | 05:24 | lender?" The post that fishyjoe
just put up. You see up here the URL is
| | 05:28 | localhost/node/3. All that, that means
is it's a node and it has ID number 3.
| | 05:34 | If you go into the database itself, you
can actually see the IDs. We are going
| | 05:39 | to do that now.
| | 05:40 | We will go to MAMP or if you are on a
Windows server, you will go to WAMP.
| | 05:44 | Open start page, phpMyAdmin, select your
Drupal database and then go down to the
| | 05:50 | table called node. There is also one
called node_revisions. The difference
| | 05:54 | between the two is if you have turned
on revisions, sometimes you have to look
| | 05:57 | in both. We are going to click on
this icon, which is the Browse icon in
| | 06:01 | phpMyAdmin. Scroll down a little bit
and we'll see a list of all our nodes in
| | 06:06 | the Drupal site and there is our blog post.
| | 06:09 | If you as the administrator wanted to
change it within the MySQL database, you
| | 06:13 | could actually do that by doing it
here or, of course, you can change it in
| | 06:16 | Drupal's interface. I am just going to
scroll to the bottom here and click on
| | 06:20 | Go to make sure that we save anything
that we might have changed and then go
| | 06:24 | back to our administrative interface.
| | 06:27 | As you develop your site you may add
node types that didn't come with Drupal's
| | 06:30 | default installation either explicitly
or by downloading modules that create
| | 06:35 | new node types. Some of these nodes
will be very complex even having dozens of
| | 06:39 | fields beyond Title and Body but your
basic understanding of nodes, how they
| | 06:43 | are stored, and how to control them
will serve you well for all of your content
| | 06:48 | types.
| | Collapse this transcript |
| Creating basic content: Stories and pages| 00:00 | We have already created one node on
this site, this main page that you see
| | 00:04 | here. Now we are going to add two more,
one will be another page that describes
| | 00:08 | our company or About page and the
other will be a story, which is slightly
| | 00:12 | different from a page and we'll show
you what those differences are. First,
| | 00:16 | let's create that page, but before we
do that, we are going to turn on one more
| | 00:19 | module at this point, the path module.
To do so, go to Administer and Modules,
| | 00:27 | and scroll down until you get to Path.
| | 00:32 | Once you do that, scroll to the bottom
and click Save Configuration. What the
| | 00:37 | Path module allows you to do is to
rename the URL. So instead of saying,
| | 00:41 | /node/3, it will just be /aboutus.
| | 00:44 | Now, we are ready to create our content.
Go up to Create Content and then Page.
| | 00:51 | We will be entering the Title and Body
from a text file that's included in the
| | 00:56 | Exercise Files that you received if
you're a Premium Subscriber on lynda.com or
| | 01:00 | have this video on a disk. To get there,
we'll go to the Finder, and then hide
| | 01:05 | everything else, open up our Exercise
Files. We already have it open to Chapter
| | 01:09 | 9, in Video 2, the file is called basic content.
| | 01:14 | Now, we can just copy and paste our
text. The title is, About Underwater
| | 01:19 | Reality, we copy that with Command+C or
Ctrl+C on a Windows machine, go back to
| | 01:24 | our Drupal interface in the web browser.
I am using Command+Tab, paste it there
| | 01:29 | with Command+V or Ctrl+V, and then do
the same for the Body. For this page, we
| | 01:39 | are going to want people to
have a single link to get there.
| | 01:42 | So, we'll go up to Menu setting and
we'll call it, About Us and its parent item
| | 01:48 | is Primary links, that's this group of
links up here. We are not going to mess
| | 01:52 | with the Weight yet, because we only
have two links up there. Later on we might
| | 01:55 | want to do that, if we want to
rearrange the order in which they appear.
| | 01:59 | Continuing down, we have entered the
Body, of course. The Input format can
| | 02:04 | remain, Filtered HTML. We'll create,
this is a new revision and just say,
| | 02:09 | Created page.
| | 02:13 | Since, this is a page that tells
about us we don't really want to invite
| | 02:16 | Comments. We just make sure that the
Comments settings are Off. This is one
| | 02:19 | difference between a Page and a
Story. A Page by default doesn't allow
| | 02:24 | comments, whereas a Story does. This
little dropdown, URL Path Settings, was
| | 02:29 | added by that Path module that we just
added to our Drupal configuration. Click
| | 02:34 | on it and we add a URL. Let's call it
about, scrolling down further, we are not
| | 02:39 | going to change the Author, we will
just check the Publishing options, we do
| | 02:42 | want it published. It's not going to
be promoted to the first page and it
| | 02:46 | doesn't matter if it's Sticky at the
top of the list, because it's the only
| | 02:49 | thing on the page.
| | 02:50 | Now, we click Save, you will notice
that it creates a node and a node number
| | 02:55 | here. However, since we added that URL
path, we can also just say about. So you
| | 03:02 | can see how that makes your site a lot
more friendly than having node/ and then
| | 03:06 | a random seeming number.
| | 03:07 | Since, we added a menu earlier, we can
now click on that menu, about us and it
| | 03:13 | goes to that page and you know what, we
can go back and Edit that menu as well,
| | 03:16 | just by editing that node. Go in to
Edit, down to the Menu settings, and I am
| | 03:21 | going to give that about us, a capital A
; scrolling down, all we have to do is
| | 03:27 | click Save and boom, you see it's changed.
| | 03:31 | Now, let's create the other type of
content, the Story. We go to Create Content
| | 03:36 | and Story, just as we did before. For
creating a Page, click on Story and it
| | 03:41 | looks very much the same. Once again,
we are going to go back to our Finder,
| | 03:47 | open up our text file and get our text.
We go down and once again, we copy the
| | 03:53 | Title, copy it and paste it and the Body,
copy it and paste it. This particular
| | 04:04 | Body has some features you haven't seen
elsewhere in the course; in particular,
| | 04:08 | it has some special HTML here <ul>
which stands for unordered list and <li>,
| | 04:12 | which stands for list item. The person
who wrote this particular story decided
| | 04:16 | they wanted a bullet point list,
because it would bring out certain points
| | 04:19 | within the story.
| | 04:20 | If you want to learn more about using
HTML, see the lynda.com course, HTML
| | 04:25 | Essential Training. We continue to
scroll down and we see in our Filtered HTML
| | 04:32 | we are actually allowed to do the tags
that we did <ul> and <li>. So we don't
| | 04:36 | need full HTML. Although, of course,
if we turned it on, it would also work.
| | 04:41 | Continuing down, we just check the
Revision information. We don't really need a
| | 04:45 | new revision, it's a Story which
usually only gets revised once, Comment
| | 04:48 | setting, we make sure
that Read/Write is enabled.
| | 04:52 | This is, once again, one of the
differences between stories and pages. URL path
| | 04:57 | settings, we could set them if we want,
we don't really need to. Authoring
| | 05:00 | information, we'll leave alone.
Publishing options is the other big difference,
| | 05:04 | between pages and stories. Stories
get promoted to the front page, whereas
| | 05:08 | pages don't. We'll click on Save and
there we are, we have our Story here with
| | 05:13 | our bulleted list.
| | 05:14 | Now, let's go back to our front page
and we'll see it, because remember, we
| | 05:17 | promoted it to the front page. We have
this, which is Sticky at the top, and
| | 05:22 | going down further, there is our Story.
| | 05:24 | There is one other thing that we can do.
Let's say that we don't want to have
| | 05:29 | quite as much text showing up on
that home page. We can click on Contract
| | 05:32 | amendment, which is, of course, the
Title that will bring us to editing this
| | 05:36 | particular Story. Click on Edit, we
only want this top section to show up.
| | 05:41 | So we put the cursor there and say
Split summary at cursor. That puts in some
| | 05:46 | special Drupal code, which will only
show this on the front page, but then when
| | 05:50 | you click through. It will show the
full Story, go down and click Save and just
| | 05:55 | to be sure that that's true, go back
to our front page, scroll down to the
| | 05:58 | Story, yup, it cut off where we
expected and it added a Read More tag. If we
| | 06:03 | want to read more, we either click on
Read more here and there we have the full
| | 06:08 | node, go back a page, or we can click
on the Title to get the full node and as
| | 06:14 | we said before, stories get comments.
| | 06:16 | So, if we wanted to add a new comment,
all that a user would have to do is
| | 06:19 | click there, and there we go, they
enter a comment and add their own ideas to
| | 06:23 | the Story. We'll go ahead and add a
comment. The subject will be, Great
| | 06:28 | information! And the comment will be,
I really appreciate it and then just
| | 06:34 | click on Preview, that's what it is
going to look like, scroll down to the
| | 06:38 | bottom and save. There we have it.
| | 06:42 | This is now the node page, if we go
just to that node page from the top. We see
| | 06:47 | there's the story and the Comments
underneath it. Incidentally, that preview
| | 06:50 | requirement is something that you as
the Administrator can set and we'll show
| | 06:54 | that in the video on Comments. You
now know everything you need to start
| | 06:57 | populating your site with stories and
pages, which is all that many sites need,
| | 07:02 | but if you want to go further with Blogs,
Polls, and Custom content types we'll
| | 07:06 | show you how to create those.
| | Collapse this transcript |
| Enabling other content types| 00:00 | Drupal 6 enables two content types
by default, Stories and Pages, but it
| | 00:05 | actually installs four others,
leaving them disabled, probably to avoid
| | 00:09 | confusion by Drupal newbies.
We'll show you how to turn them on.
| | 00:12 | So, you can start creating Blogs,
Polls, linked articles called Books, and
| | 00:17 | message boards, which Drupal calls
Forums. In fact, we are going to go and turn
| | 00:21 | on Forums first. Go to Administer, and
then go down to Modules, and, of course,
| | 00:28 | as always, you see a list of the
modules that are available. We already turned
| | 00:32 | on one Content type called Blog.
| | 00:34 | Now, we are going to turn on Forum,
just by clicking in here and scrolling to
| | 00:38 | the bottom and clicking Save. You will
also notice Book and further down Poll,
| | 00:44 | we leave those Off for now, but we
click Save, so that we have Forums.
| | 00:50 | Now, when we go to Create Content, we
will see four things listed, Blog Entry,
| | 00:55 | Forum Topic, which was from the new
module that we just added, Page, and Story.
| | 01:00 | Page and Story again are default, built
into Drupal. Let's go to Administer and
| | 01:06 | then to Content type so that we can
see all of those and change some of their
| | 01:09 | criteria and the way they behave.
| | 01:12 | Again, we see all four; interestingly,
Page and Story can be deleted, even
| | 01:17 | though they were installed by default.
Blog Entry and Forum Topic, however,
| | 01:21 | cannot. That's because these are
created by Modules and the only way to turn
| | 01:25 | them Off is by going back and turning
off the Module in the opposite way that
| | 01:29 | we have just turned them on. Most
content types are quite similar and if we go
| | 01:32 | to Create Content and click on any
one of these, you will notice the
| | 01:36 | similarities. They have a Title, a Body,
and then perhaps some other fields.
| | 01:40 | Once again, we go to Create Content
and Create Forum Topic, still it's called
| | 01:44 | Subject, but it's basically the same
thing. Now, let's go and create our own
| | 01:48 | custom Content type. To do that, we go
to Administer, Content types, and Add
| | 01:56 | content type here at the top. We are
going to create a content type that's just
| | 02:00 | going to be a test and we are going
to delete it before we are done, and in
| | 02:03 | fact, we'll show you some of the
effects that happen if you accidentally delete
| | 02:06 | a content type and how to get back, if
you do so; because doing so, when you
| | 02:10 | have content, that's in that
Content type can cause a lot of problems.
| | 02:14 | For our content type, we'll call it
Test content type; under Type we are going
| | 02:20 | to simply enter Test. This is the
machine readable name of the Content type.
| | 02:25 | It should be as simple as possible and
you can see from the text underneath, it
| | 02:29 | limits the sorts of characters that
you can use in this name, I always just
| | 02:33 | enter with lowercase, very simple,
just enough so that I know what it is,
| | 02:37 | because again, I don't have to see it.
What I'll be seeing mostly is Test
| | 02:40 | content type, what the machine is going
to see is Test. Under Description, just
| | 02:44 | to make sure that we don't accidentally
put any content in that we really want
| | 02:47 | to keep, I'll say, "This is a test
content type. Don't put anything you really
| | 02:55 | want to save in it!" And then at the
bottom, you will notice some settings that
| | 02:59 | are very similar to when you Create Content.
| | 03:02 | In particular, this is Workflow Settings.
The thing is this is going to be the
| | 03:06 | default. So that, whenever you click
Create Content and choose this test
| | 03:10 | content type. This is what's going to
show up unless the person changes it.
| | 03:14 | Since, I like to create a new revision
every time I create some content, I am
| | 03:18 | going to check this; that will force
the person to uncheck it, if they want to
| | 03:21 | create a new revision.
| | 03:23 | There are two other dropdown menus here,
which are a little bit different. One
| | 03:27 | is Submission Form Settings. Let's
click on it. This really just let's you
| | 03:31 | change what the field labels are; in
other words, instead of Title you might
| | 03:35 | want to say, Address of Property and
in Body, you can say Description of
| | 03:41 | Property. Again, this is a test that
we are doing, so we'll be deleting this
| | 03:45 | later. Of course, if you create your
own Content type you could put in whatever
| | 03:48 | you like. Minimum number of words is
a nice little thing. If you don't want
| | 03:52 | people to just be posting and saying, "
I agree with that," then you can say,
| | 03:57 | you know, you have to write 100 words
or it's not going to go up, we are just
| | 04:00 | going to leave it at zero for now.
| | 04:01 | Finally, you can have submission
guidelines, for example be bold, be brave or
| | 04:06 | whatever you like, of course. Scrolling
down there is one other thing, Comment
| | 04:12 | settings. These are quite complex,
they let you determine whether or not you
| | 04:16 | are going to allow people to comment
in here, not only that they'll also let
| | 04:19 | you determine how the comments will be
displayed - if they'll be showed in a
| | 04:22 | threaded list, if they'll be sorted
oldest first or newest first, and so forth.
| | 04:26 | We are going to disable comments on
this content type. We do discuss comments
| | 04:30 | more in another video that's
specifically about managing comments. Scroll to
| | 04:34 | the bottom and Save Content Type.
| | 04:37 | Good, so we've created, as you can see,
this Content type called Test content
| | 04:43 | type. Now, let's switch to an ordinary
user and see if that person can create
| | 04:48 | some content in that Content type,
switching over by holding down the Command
| | 04:51 | key and hitting Tab on the Mac
keyboard. We already have a window opened in
| | 04:55 | Firefox with our ordinary fishyjoe.
Click on Create Content; wait, we don't see
| | 05:01 | our test content type, that's because
we didn't give permissions to create that
| | 05:06 | Content type.
| | 05:07 | Let's go back to the Administrative
user, go in to Administer and our old
| | 05:12 | friend Permissions. Click on that and
you'll notice as you scroll down in the
| | 05:21 | node module there is a new choice,
create test content. Since I know fishyjoe
| | 05:27 | is a Contributing user, I am going to
say, "Yes, he can do it." Ordinarily,
| | 05:30 | authenticated users can't, but he can
because I trust him as a contributing
| | 05:34 | user. Scroll down to the bottom of
the screen, click Save, and now let's go
| | 05:40 | back to fishyjoe.
| | 05:42 | Now, click Create Content again and
there it is, test content type. You'll
| | 05:47 | notice that when you hover over test
content type, it gives you that little
| | 05:51 | help text that we mentioned before.
Let's click on it now and actually create
| | 05:55 | something, Address of Property, we will
say at 819, 15th Street, Description of
| | 06:00 | Property, "Boy, this is place is swank
!" Scroll down a little bit further and
| | 06:09 | we can see it's forcing revision
information. So we'll say, Created new story
| | 06:16 | and Save; and there we are, we have
our new piece of content in test content
| | 06:21 | type. You may remember that we also
had, Promote to front page checked.
| | 06:25 | So, let's go to the front page and see
if it's there; click here, remember we
| | 06:30 | had this as sticky at the top of list.
So, it will show up underneath and there
| | 06:34 | it is, we had Comments turned off,
let's make sure that's true, by clicking on
| | 06:38 | the Title - nope, no place to add
comments, good, it's all working exactly as
| | 06:42 | we wanted.
| | 06:43 | Now, here is a tricky thing. We go back
to the administrative interface, click
| | 06:47 | on Administer and Content Types. We
notice that we can actually delete that
| | 06:52 | Content type. What happens if we do
though? Say Delete, this is going to be
| | 06:58 | tricky, don't worry we will come back
to it and we'll make everything all right
| | 07:01 | again. We are going to delete this Content type.
| | 07:05 | So, we have deleted the test content
type, but is it still there? Is the
| | 07:10 | content that was in that Content type
still on the site? Let's go back up, take
| | 07:14 | a look at our front page, yep, it's
still there. We click on it and we see it's
| | 07:18 | still viewable. When we click on Edit
however, it doesn't work. It doesn't work
| | 07:25 | because we've deleted the Content
type and so as you can see Drupal doesn't
| | 07:28 | know what to do what to do with it.
This is a node which has no Content type
| | 07:31 | attached to it and we can prove that
by going to Administer, Content which
| | 07:36 | lists all the content on our site. See
how all of these have types, this story
| | 07:40 | doesn't have a type.
| | 07:42 | So, we can't edit this particular story.
Let's go back to it and we can't even
| | 07:46 | delete it, there is no place to delete
this story. I am going to click Back, to
| | 07:49 | go back to our list.
| | 07:51 | There are a few things that we could
do however. We could go in and we could
| | 07:54 | copy the text and just post it as a
story or page or something else. There is
| | 07:59 | one other way that you can make this
content editable again, which is to change
| | 08:02 | it to a different type. To do so you
will have to go into MySQL, through the
| | 08:06 | phpMyAdmin interface. We are going to
that by switching to MAMP or WAMP, if you
| | 08:12 | are on a Windows server, open start
page and, of course, phpMyAdmin. From there
| | 08:17 | you will choose your Drupal database
which we've named Drupal and then scroll
| | 08:21 | down until you get to node. Click on
this little icon, which let's you browse
| | 08:27 | the node that is all the content in
your site and scroll down until you find
| | 08:33 | the node that you want, but notice
that as a type, it's still test which
| | 08:37 | doesn't exist anymore, we
are going to change it to Story
| | 08:40 | To do so, click on the little pencil
icon and then simply type in Story, scroll
| | 08:46 | back down to the bottom, click on Go,
then we are going to switch back to our
| | 08:51 | Drupal interface and reload this page
and there we are, it's now a story and we
| | 08:58 | can actually edit it again.
| | 09:00 | Just to clean everything up, we are
going to delete this piece of content, you
| | 09:07 | might ask yourself, 'why would I want
to define a Content type anyway?" It's
| | 09:11 | not really apparent from the way,
Drupal set up by default, by development of
| | 09:15 | good Content types leads to tremendous
flexibility in both Content creation and
| | 09:20 | display.
| | Collapse this transcript |
| Adding blogs| 00:00 | One of the most popular features of
social online media is the ability to
| | 00:04 | easily keep journals, commonly known as Blogs.
| | 00:08 | By default, Drupal installs software
that allows every registered member of
| | 00:11 | your site to maintain a Blog and
presents those Blogs in a convenient and
| | 00:15 | familiar way. As you are site's
Administrator, you have complete control over
| | 00:19 | which members, if any, may keep
Blogs and you might decide to only allow
| | 00:24 | yourself that privilege, but first, you
have to turn on the blogging module. To
| | 00:28 | do so you go to Administer and Modules.
| | 00:32 | Now, we've already turned it on, but
if you haven't, you would make sure that
| | 00:36 | this is clicked, so that it's checked,
go down to the bottom of the page and
| | 00:42 | say, Save Configuration. Once you have
done that, there will be an additional
| | 00:47 | type of content under Content types.
To see that go to Administer and Content
| | 00:52 | types and there you have it, Blog, but
your job isn't done there, because you
| | 00:57 | have to give permission to allow
certain people on your Drupal site to create
| | 01:01 | and edit their Blogs. To do so, go
to Administer, and scroll down to
| | 01:06 | Permissions.
| | 01:08 | Again, we have already done this, but
if you want to allow everybody to keep a
| | 01:12 | blog, you would check anonymous user.
If you only wanted your members to create
| | 01:16 | Blogs, you would check authenticated
user. We also have an additional group
| | 01:19 | called Contributing user. That's next
to Create Blog Entries, we however not
| | 01:24 | given them permission to delete
their own blog entries or edit their blog
| | 01:28 | entries. In other words, once they have
started them, they have to keep them. I
| | 01:32 | am going to give Contributing users
that additional ability to edit their own
| | 01:35 | blog entries. Whatever changes you
decide to make, go down to the bottom of the
| | 01:39 | page, and click Save permissions.
| | 01:44 | So, now we've allowed certain users to
create and edit their blogs. I am going
| | 01:48 | to switch to one such user. The one we
have logged in, on the separate browser
| | 01:52 | called Firefox and that user's name
is Fishyjoe. Fishyjoe clicks on Create
| | 01:56 | content and then Blog Entry and let's
just add an entry here; how about, "I've
| | 02:02 | decided to take the plunge. I'm going
to buy some underwater property. Does
| | 02:14 | anyone have tips to help me?" And we
will go down to the bottom here and click
| | 02:20 | on Save, that's very much like creating
a story, or page, or any other Content
| | 02:24 | type.
| | 02:25 | By default, all Blog posts go to the
front page and if we click on the icon
| | 02:30 | here, we will go to our front page,
scroll down and since these are kept in
| | 02:33 | reverse chronological
order; it will be at the top.
| | 02:36 | Also, Blogs allow Comments, you can
comment directly by clicking on Add new
| | 02:41 | comment or if we go back to that page
by clicking on the Back button we can
| | 02:45 | click on the Title of the Blog and see
the entire Blog and then say, Add New
| | 02:50 | Comment. You will also notice an
additional link here, which will give us a
| | 02:54 | list of all of the posts that Fishy Joe
has made in his Blog, let's take a look at that.
| | 02:58 | We had earlier added one Blog post, "
Can you help me find the lender?" So, here
| | 03:02 | we have the most recent one at top
and then again in reverse chronological
| | 03:05 | order, the next one. If you want to
see everybody's blog, you could just say
| | 03:10 | localhost or whatever your website is,
localhost/blog and that gives you
| | 03:15 | everybody's Blog at once.
| | 03:17 | Since, Fishy Joe is the only person who
has created Blog post, that's all that
| | 03:21 | shows up on this page. Of course,
you could create a menu that would go
| | 03:24 | directly to this page and we'll show
how to that in the video about menus.
| | 03:28 | Blogs are a great way to get people
involved in your site, but there is a
| | 03:31 | downside, they get people involved in
your site in unregulated ways that could
| | 03:36 | go against your interests.
| | 03:37 | So they are best, if you either limit
blogging to those site members who you
| | 03:41 | can trust, such as employees of a
company or for community sites where you are
| | 03:45 | not trying to enforce a
particular point of view.
| | Collapse this transcript |
| Adding forums| 00:00 | One of the earliest functions the
internet served when first developed 40 years
| | 00:04 | ago was to permit conversations among
likeminded people. Nowadays, one of the
| | 00:08 | most popular venues for such
conversations is the web-based bulletin board.
| | 00:13 | Drupal includes functions that let you
create such bulletin boards and control
| | 00:17 | how your members use them.
| | 00:18 | In Drupal we call them Forums. The
first thing to do is to turn on Forums by
| | 00:22 | going to Administer, Modules and Forums.
We've already turned ours on, but you
| | 00:31 | haven't, just make sure that this box
is clicked, go down to the bottom of the
| | 00:35 | page and click Save Configuration.
| | 00:39 | As with blogs, this adds another
content type, if you go to Create Content,
| | 00:44 | you'll see Forum Topic. But before we
go any further, we should talk about
| | 00:49 | exactly what a forum is. A forum is
first and foremost a place for threaded,
| | 00:54 | open, multi-participant discussions.
Historically speaking, these are
| | 00:58 | extensions of mailing lists, bulletin
board systems and the Usenet system of
| | 01:02 | new stories.
| | 01:03 | In Drupal, these are organized in a
multilevel hierarchy. The hierarchy is as
| | 01:09 | follows. First is the Forum module,
which contains all of the forums. Inside
| | 01:14 | that module there can be Containers, so
for example, you might have a container
| | 01:18 | called Cars which would have multiple
forums for Scion, Toyota, Honda and so forth.
| | 01:24 | Inside each of those forums,
individual users can enter topics. For example,
| | 01:29 | "How do I get more mileage out of my Scion?"
And finally to each of those topics,
| | 01:34 | other users or the original user can
enter comments such as, "Well, here's what
| | 01:37 | you do to get more mileage." We'll see
what this looks like when we start to
| | 01:41 | build our forum.
| | 01:43 | To see how this works, we're going to
add a new forum that's going to be called
| | 01:46 | Tips for underwater living. To do so,
we go to Administer and Forums. As you
| | 01:53 | can see, we've no containers or forums,
we'll add a forum here and call that as
| | 01:58 | I said, Tips for underwater living.
We'll also enter a description, Help for
| | 02:06 | those who are livin' la vida mojada!
Or for those of you who don't speak
| | 02:14 | Spanish, Living the wet life.
| | 02:16 | We're only going to have one forum at
this point, but if you had more, you
| | 02:20 | could set it up in a hierarchy, so to
use our earlier example in the San forum,
| | 02:25 | there might be a subcategory for XA
owners, XP owners and so on down the
| | 02:29 | different models. But for now, we're
just going to ignore it and keep its
| | 02:32 | parent at root. That is the
basic place where all forums go.
| | 02:37 | Weight as with other screens determines
which one is listed first. We're going
| | 02:41 | to leave it on 0 since we only have
one and we click on Save. There we've
| | 02:46 | create our first forum, I'm going to
create one more forum called Buying
| | 02:53 | property and I won't put in any
description just to make it concise. I'll
| | 02:58 | create one more called Selling
property and again just save that.
| | 03:05 | If we want to see all of these, we go
to our website/forum and we see a full
| | 03:11 | list of all of our forums and as you
can see, we've our description right here
| | 03:15 | where is these two which don't have
descriptions are just given by their
| | 03:18 | titles. Let's go back though by going
to Administer, Forums and let's set up a
| | 03:24 | container. We'll add a container, which
is going to be called Trading property.
| | 03:30 | Again, we'll leave that at the root and
save it. Now, we've this container and
| | 03:36 | we can put buying and selling
property into it by grabbing it by this arrow
| | 03:39 | icon and dragging it down like so.
Incidentally, you can also put forums as
| | 03:47 | subgroups of forums like so by moving
it in and out of the hierarchy. I'll
| | 03:52 | click on Save and then we'll take a
look at what exactly that looks like by
| | 03:57 | going to /forum.
| | 03:59 | As you can see, categories show up here,
but you can't actually post anything
| | 04:03 | in them, there are only containers for
holding other forums. So, we've these
| | 04:08 | forums, but how exactly do we add
information to them? First, if we want to
| | 04:12 | make them available to all of our
users, we're going to have to give the
| | 04:16 | permissions as always. We go to
Administer, scroll down to Permissions and then
| | 04:24 | go down to the Forums module.
| | 04:28 | The main permission that we want to
give people is whether or not they can
| | 04:31 | create forum topics. We'll give that to
our authenticated user, incidentally we
| | 04:36 | don't have to give it specifically to
the contributing user because they're by
| | 04:40 | their nature also an authenticated user.
We're not going to allow anybody to
| | 04:44 | delete or edit their forum topic,
although of course you're welcome to do that
| | 04:48 | if you like. We scroll down to the
bottom of the page as usual and click Save
| | 04:53 | permissions.
| | 04:54 | Now, let's switch to our ordinary
user, fishyjoe. Now, fishyjoe can add
| | 04:59 | something to the forums by going to
Create Content, Forum Topic and then
| | 05:04 | entering whatever information he wants,
let's say Seeking equity partner and he
| | 05:09 | could say, "I'm seeking a $20K equity
partner for my property in Soggy Acres.
| | 05:21 | Comment here for more information." Now,
there's one other field that we don't
| | 05:27 | see in other content types which is
which forum do we want to put it in.
| | 05:30 | In this case, we'll put it into Selling
property, but if you look at the list,
| | 05:34 | you can see how the hierarchy is
shown. Remember Trading property is a
| | 05:37 | container, you can't post there, but
it shows these subcategories, Buying
| | 05:42 | property and Selling property. We'll
put it in Selling property, if you were to
| | 05:46 | try to post it in Trading
property, let's see what happens.
| | 05:49 | Scroll to the bottom and say Save, oh
! Tells you, you can't do it. So, now
| | 05:55 | we'll go to Selling property, go down
to the bottom, Save, terrific, we've
| | 06:02 | created it. Let's go, take a look at it
by going to directly to Forum and there
| | 06:07 | it is, we see that we've one topic
with one post. The other way he could have
| | 06:11 | posted was by clicking on the forum
itself and saying, Post new forum topic.
| | 06:16 | Let's say somebody else comes along
and wants to read that. They go through
| | 06:19 | here, click on the topic and then they
can add a new comment if they want just
| | 06:24 | as they could in other places in Drupal.
But for now, we're just going to go
| | 06:27 | back to our homepage. As with blogs,
forums are a double-edged sword. On the
| | 06:34 | one hand they can increase
participation in your site, but on the other, they
| | 06:37 | can result in some unpredictable and
sometimes offensive content in places that
| | 06:41 | you don't want it.
| | 06:43 | If you decide to enable forums, I
recommend that you budget ongoing time to
| | 06:46 | monitor them to keep out not only flame
wars, but also spam, regardless forums
| | 06:51 | are well worth the time for
increasing participation in your site.
| | Collapse this transcript |
| Adding polls| 00:00 | Drupal's poll module gives you a way to
present simple multiple questionnaires
| | 00:04 | to visitors and then tabulate their
responses in useful ways. You can limit how
| | 00:08 | long a poll will run which is useful for
making group decision and who can vote on it.
| | 00:14 | As elsewhere in Drupal, we turn on
polls by going into Administer, Modules, and
| | 00:21 | then click to turn on the Poll Module.
There we go, and then we will go down to
| | 00:28 | the bottom and say Save Configuration.
Now we have turned on polls, but there
| | 00:34 | is one other thing we should do as we
do with many other modules when we turn
| | 00:37 | them on, we have to make sure
permissions allow people to vote on them.
| | 00:40 | So we go down to Permissions in the
Administration interface and then scroll
| | 00:47 | down to Poll Module. The most
important one in here is whether or not people
| | 00:54 | can vote on polls. I am going to let
all authenticated users do that, and
| | 00:59 | remember contributing users are also
authenticated users. You can also allow
| | 01:03 | people to inspect votes to see how
everybody has voted or to cancel one's own vote.
| | 01:08 | The other poll permission options are
for creating polls and of course you can
| | 01:12 | turn those on and off as you think is
right. We will scroll to the bottom of
| | 01:15 | the page and click on Save Permissions.
So now we have turned on and allowed
| | 01:20 | all of our regular users to vote on them.
But how do we create a poll? Well, a
| | 01:25 | poll is really just content. So we go
up to Create Content and Poll. We are
| | 01:31 | going to create a poll
that's relevant to our site.
| | 01:33 | So how about, which condo developments
do you prefer? First choice is going to
| | 01:41 | be let's say Soggy Acres. The second
one will be Mildew Point and then we will
| | 01:46 | add another choice right here. You can
keep on adding choices as much as you want.
| | 01:52 | The third one is Hudson Mews, and
the forth one is Mark Twain's Riverboat
| | 01:59 | Graveyard. Now, you will notice
something unusual on this right-hand side,
| | 02:04 | which is that you can actually cheat on
the poll. That is you can have it start
| | 02:08 | with Soggy Acres having 13 votes,
Mildew Point having 25 and so forth. We are
| | 02:13 | going to do that just so that we have
some votes in the record and you can see
| | 02:16 | how it tabulates responses.
| | 02:19 | As we go down, here are the time
settings. We decide has the poll actually
| | 02:22 | started or not? This is very useful if
you want to design the poll first but
| | 02:26 | not actually launch it until a
certain event is passed. Like let's say a
| | 02:30 | primary or midnight on a certain day.
But for us we will say it's active and we
| | 02:34 | are going to have it go just for one
week. Scroll down further and you will
| | 02:39 | some settings that you have
seen in other content types.
| | 02:41 | For example you can make this menu
selection that shows up in the upper right
| | 02:45 | hand corner in the screen or in
navigation menu on the left hand side. You can
| | 02:49 | set it so that each time you revise
the poll, it keeps a copy of the old one.
| | 02:53 | Let's actually give this one a path
setting. We will call it poll_condos.
| | 02:59 | Comments, do you want people to be
able to comment on this? For polls, that's
| | 03:02 | usually turned on to for read and write
because people not only want to say yes
| | 03:06 | or no to an issue, they want to talk
about it. Finally, authoring information
| | 03:10 | can be changed as usual and publishing
options, by default it is promoted to
| | 03:14 | the front page. Let's save
that and see what it looks like.
| | 03:18 | There we are. If we go to the front
page as the administrator and scroll down,
| | 03:23 | it becomes like a story at the top of
our nodes. Of course this one up here is
| | 03:27 | sticky, so it's stays at the top of everything.
| | 03:30 | Now I should mention, that Drupal
polls give a lot of power to the
| | 03:33 | administrators. The administrator can
for example change the poll questions
| | 03:36 | after the poll has started which can
be of course quite dangerous in making
| | 03:40 | people say things they don't mean to.
The Drupal administrator can see how
| | 03:43 | people voted. However, the Drupal
administrator cannot directly change the vote
| | 03:48 | of the individual members.
| | 03:50 | If you want to make your polls more
open, what should do is check that
| | 03:53 | permission that allows members to see
everything about who has voted. In that
| | 03:56 | way they can say, "Hey, did you really
vote that way? Hey wait. I didn't vote
| | 03:59 | that way." And they can complaint if
they want to leave the site or anything
| | 04:02 | like that.
| | 04:03 | So we have created our poll. Now let's
try voting on it. As the administrator,
| | 04:07 | I am going to vote for Mark Twain's
Riverboat Graveyard. There we go and it
| | 04:12 | tells me that my vote was recorded.
Let's scroll down again and you will see
| | 04:16 | something interesting. We can't vote
again. See, it shows us the results, but
| | 04:21 | doesn't give us the choices. Even if
we click here to show the node, we can't
| | 04:25 | change the vote.
| | 04:27 | Furthermore, let's go back to our
ordinary user, fishyjoe, who I have running
| | 04:32 | in another browser. We will reload
this page so that fishyjoe also sees the
| | 04:36 | poll and we scroll down. Now you will
notice fishyjoe can vote this even though
| | 04:43 | the administrator voted and saw the
results, fishyjoe can still vote. Well, I
| | 04:48 | see Mildew Point is the best. So there we go.
| | 04:51 | Now of course fishyjoe sees the results.
| | 04:55 | In short once you have voted once,
you can't vote again. The only other way
| | 04:59 | that you are forbidden from voting is
if you have not being given permissions.
| | 05:02 | Typically that's done for anonymous
users, because otherwise anonymous users
| | 05:06 | would just come and vote from
different computers would clear their cookies,
| | 05:09 | might really stack the desk.
| | 05:12 | As with other content types such as
forums and blogs, you can see and of the
| | 05:16 | polls that have been posted by going
up here and using the URL Poll. Once you
| | 05:21 | have learnt how to use menus, you can
create a menu selection that will go
| | 05:25 | directly to that page, but let's take a look.
| | 05:27 | There we are, we have a list of polls
and of course if we had more polls they
| | 05:30 | would all show up here. It tells us how
many votes and whether it's still open.
| | 05:34 | If we were to come back to this page
in eight days, it would say closed,
| | 05:37 | because we only set the time limit to
be a week. Click on it and again, we see
| | 05:42 | the node itself.
| | 05:43 | One other thing happens when you
enable polls which is that a block is
| | 05:46 | automatically created that you can
move to different parts of the site. Let's
| | 05:50 | switch back to our administrator's
interface and see how that works.
| | 05:53 | We will go to Administer, Blocks and
scroll down until we see most recent poll.
| | 06:03 | Here it is, let's put that in the
right-hand sidebar and say Save. There we
| | 06:10 | have it. If we hadn't answered this
poll, of course we would be asked the
| | 06:14 | question and it would look just the
same as it did on our main page. This is a
| | 06:18 | very good way to keep content on our
site fresh. That is put the most recent
| | 06:22 | poll or the most recent blog post, the
most recent comment in that right hand
| | 06:26 | column or somewhere else on the page
where it's obvious. It gives your site a
| | 06:30 | sense that it's always fresh.
| | 06:32 | Let's see what that look like on an
ordinary user's page. So we will switch
| | 06:35 | back to fishyjoe, click on the logo,
which brings us back to our homepage. And
| | 06:40 | there you have it, polls are
especially good for encouraging interaction,
| | 06:44 | because voting is much easier for
visitors to do then writing a blog post or a
| | 06:48 | forum comment. In addition, polls
frame issues by giving limited choices and
| | 06:53 | their collective nature
creates a sense of a common goal.
| | Collapse this transcript |
|
|
10. Managing Site ContentExploring content categories| 00:00 | If you'd tried building a forum in
Drupal, you've already encountered a way of
| | 00:04 | defining content with categories known
as Terms. In that case, each term you've
| | 00:09 | defined became the name of a forum,
but Drupal system of categorization has
| | 00:13 | uses well beyond that simple example
and in fact, is essential to advanced
| | 00:17 | functions you might want to
add later to your Drupal site.
| | 00:20 | Before we go on, let's take a look at
what exactly categorization does for a
| | 00:24 | site. We'll do that by looking at
Lynda.com. On Lynda.com, you can see the
| | 00:31 | videos that are available according to
product or vendor, the number of other
| | 00:34 | categories or you can look at All
Courses. Let's do that now. On this page, you
| | 00:41 | can see that Acrobat 9 Pro
Essential Training shows up in the Acrobat 9
| | 00:45 | category, which makes perfect sense.
That's because this video has been tagged
| | 00:49 | Acrobat 9. But you'll notice it also
shows up under Acrobat. So, it has two
| | 00:54 | tags to it; Acrobat 9 and Acrobat. The
good thing about this system is nobody
| | 00:59 | has to maintain this page
specifically; all they have to do is to add the
| | 01:03 | correct tags and then build a system
that will collect all the ones that have a
| | 01:07 | certain tag and put them in one place.
So, for example, if we go down to
| | 01:11 | Product, Acrobat, we see only those
that have the Acrobat tag. But enough about
| | 01:17 | the Lynda.com site, let's
go back to our Drupal site.
| | 01:20 | To start categorizing content, we go
to Administer and Modules and make sure
| | 01:26 | that the Taxonomy module has been
turned on. It's automatically turned on if
| | 01:31 | you've turned on the Forum module as
we have done. In fact, you can't turn it
| | 01:35 | off but it's required by the Forum
module. If, however, it's not checked, you
| | 01:39 | would check it here and then go down
to the bottom of the page and click Save
| | 01:43 | Configuration. Once you've done that,
you are ready to administer your
| | 01:48 | taxonomies. To do so, go to
Administer and scroll down until you get to
| | 01:53 | Taxonomy. Because we have already
created forums, we see one taxonomy down
| | 01:59 | here, which is Forum Topics. We are
going to add one that's going to be
| | 02:02 | specific for blog posts, so that when
somebody posts something in their blog,
| | 02:07 | they are forced to say exactly what
category it falls into. We'll do that by
| | 02:11 | clicking on Add vocabulary
and we fill in the fields below.
| | 02:15 | For us, that will be name is Blog post
categories. The Description will be Tags
| | 02:22 | to categorize blog posts and for Help
text, we'll just add, Help others find
| | 02:29 | related blog posts. Continuing down,
we can say what sort of content type we
| | 02:35 | want this to apply to. We are only
going to categorize our blog entries, so
| | 02:39 | we'll click there but we could do
multiple content types. At the bottom of this
| | 02:43 | screen, we have three settings that are
specific to taxonomies. One of them is
| | 02:47 | Tags. The difference between Tags
and an ordinary taxonomy is that with a
| | 02:51 | standard taxonomy, the user can only
choose from categories that you've already
| | 02:56 | defined. With Tags, they can enter
their own categories. We'll show exactly how
| | 03:00 | that works in a moment.
| | 03:02 | Multiple select, as might imagine,
allows people to include several categories
| | 03:06 | in their posts and finally, Required
will force them to enter at least one
| | 03:11 | category in their post. We are going
to turn on Required here and click Save.
| | 03:16 | Very good, now let's see how this
affects an ordinary user. To do that, we are
| | 03:20 | going to switch to Fishy Joe's
account. He is logged in, in the Firefox
| | 03:24 | browser. And let's take a look at all
of the blog posts. We do that by going up
| | 03:29 | here and going to /blog and we can
see that here is one that Fishy Joe has
| | 03:33 | posted. Let's go into it and edit it.
You'll notice a new option, Blog post
| | 03:39 | categories, in that little orange star
means that it's required. If Fishy Joe
| | 03:43 | decides not to add on, we'll see what happens.
| | 03:46 | Ah! He is one that he has to. So, now
he would have to choose something here
| | 03:52 | but for right now, he doesn't have
anything to choose, let's go back to our
| | 03:55 | administrative interface and give him
some options. So, we are back Administer
| | 04:01 | and Taxonomy and at the bottom, we have
Blog post categories. Now, we list the
| | 04:06 | terms and see there's nothing there, we
need to add additional terms and these
| | 04:10 | terms will be what Fishy Joe will be
selecting from. Let's call a term Buying.
| | 04:17 | For Tags, I suggest that you only
have single words to avoid confusion.
| | 04:22 | Under Advanced options, we can choose
whether that term is the child of another
| | 04:26 | term or the parent of another term and
create a hierarchy of terms. We can also
| | 04:31 | say, whether it's a synonym for
another term. We won't get into any of those
| | 04:34 | advanced options at the moment, instead
we'll click Save and you'll notice that
| | 04:39 | it leaves you on the Add terms screen.
That's because typically, when someone
| | 04:42 | is creating a taxonomy, they create
several terms at once. I am going to add
| | 04:46 | Selling and I'll create Properties. I
think that's enough terms for now. Well,
| | 04:56 | let's add one more. Lifestyle. Very
good. Now, let's go back to Fishy Joe's
| | 05:02 | account and view this
note again and edit it again.
| | 05:07 | Now, when we go to Blog post
categories, we can see that there are several
| | 05:11 | choices there that he can choose from.
In this case, he is talking about buying
| | 05:15 | properties, so we'll select Buying and
say Save. But here's the thing; he is
| | 05:21 | talking about buying but he is also
talking about properties. Maybe we should
| | 05:25 | let him select more than one. Well,
let's go back to our administrative
| | 05:28 | interface and make that so. To do so,
we go back here and Administer and
| | 05:35 | Taxonomy. From there, we can edit our
vocabulary, scroll down to the bottom and
| | 05:42 | allow a multiple selection. Scrolling
down further, we save it and then let's
| | 05:48 | go back to Fishy Joe and see how that
affects the ordinary user. Click again on
| | 05:53 | Edit. Now, you'll notice it's a
different sort of menu and if you hold down the
| | 05:57 | Command key on the Mac or the Ctrl key
on a PC, you can select more than one.
| | 06:02 | In fact, you can hold down the Shift
key and select all of them by selecting
| | 06:06 | the first one and then the last one,
but we are just going to have Buying and
| | 06:09 | Properties.
| | 06:10 | Scroll to the bottom and save. Very good,
you'll notice that those tags show up
| | 06:16 | after the post. So for example, by
clicking on Buying, we would show all such
| | 06:20 | posts that were about buying because
they had been tagged as Buying. There is
| | 06:25 | one last thing we are going to do by
switching back to the administrative
| | 06:28 | interface. Let's got back to that
taxonomy, edit the vocabulary and scroll to
| | 06:35 | the bottom again. This time, we are
going to let it be free tagging and we save
| | 06:41 | it and see how it affects an ordinary
user by going back to Fishy Joe. Let's
| | 06:46 | edit it one more time and you see that
instead of having a drop-down menu, it's
| | 06:52 | this list into which he can freely
add tags. There's something interesting
| | 06:56 | here, which you see in this little
circle. Let's just try typing Buying. Ah! It
| | 07:02 | notices once you start typing that there
is something in there already called Buying.
| | 07:06 | If I do comma and do another one and
we can start typing the next one. Ah!
| | 07:11 | Properties, it recognizes that. So,
we'll click on that. We'll then scroll to
| | 07:15 | the bottom and say Save and there we
have it. We have tagged our Blog post as
| | 07:20 | Buying and Properties. If we want to
see all the properties tagged to blog
| | 07:24 | posts, we would just click there and
there we are. Of course, we only have one
| | 07:28 | at the moment but we could have many as
the site grows. As with any other part
| | 07:32 | of your site that's open for user
interaction, taxonomies can be abused. One
| | 07:37 | way to avoid such problems is to
limit categorization only to those
| | 07:41 | pre-determined tags that you have defined.
| | Collapse this transcript |
| Exchanging content via RSS| 00:00 | One way that websites exchange
information is via a format called RSS or Really
| | 00:05 | Simple Syndication. Drupal has a
feature built-in that let's you both publish
| | 00:09 | information from your website and
subscribe to information from websites
| | 00:13 | throughout the Internet. Before we get
into talking about how Drupal publishes
| | 00:17 | and subscribes to RSS feeds, here's
a brief description of what RSS is.
| | 00:22 | RSS is typically a format for
publishing serial material such as blogs,
| | 00:27 | periodicals, and community sites. It's
used for publishing information that's
| | 00:32 | updated frequently, for example, a
newspaper would publish its news stories
| | 00:36 | through RSS. It doesn't make much
sense to publish static information through
| | 00:40 | RSS since the newsreaders grab it and
then replace the old information with new
| | 00:44 | information. If your information
doesn't change frequently, it would quickly be
| | 00:48 | pushed to the bottom. In RSS,
content is syndicated through a feed or a
| | 00:54 | channel. You may hear both words. That
content is then viewed through either a
| | 00:58 | reader or an aggregator. A reader
usually refers to a piece of software such as
| | 01:03 | Apple Mail, whereas an aggregator
usually refers to a website. There are many
| | 01:08 | websites that will actually let you
look at RSS content including Google and
| | 01:12 | LiveJournal and in fact, any Drupal
site will let you aggregate RSS feeds from
| | 01:17 | throughout the Internet. So, that's
the theory, but what is RSS in practice?
| | 01:22 | Let's take a look at few sites to
see how it works. We'll start with
| | 01:26 | Drupal.org, which makes a lot of
information available as an RSS feed. For
| | 01:30 | example, if you wanted to see all the
stories that appear on Drupal.org's front
| | 01:35 | page, but you don't want to have to
keep checking the website, you could
| | 01:38 | subscribe via RSS. To do that, you
would click on the little RSS symbol in your
| | 01:43 | web browser and it would show you the
page that you would need to include. In
| | 01:47 | this case, it's drupal.org/node/feed.
You would put that in your RSS reader and
| | 01:54 | it would then feed these stories in as
they became available. That little RSS
| | 01:58 | symbol shows up on many, many websites.
| | 02:00 | Here's another. This is the page groups
.drupal.org/bayarea and it keeps track
| | 02:07 | of all of the Drupal related activity
in the San Francisco bay area. One again,
| | 02:12 | if you wanted to subscribe to it, you
would clear here and get your feed here
| | 02:17 | in the address bar. This would then be
copied into your RSS reader. There's one
| | 02:21 | other place that provides RSS feeds
that I found very useful for running a new
| | 02:26 | site that's Google. Let's search Google
.com for waterproofing. Now, we don't
| | 02:34 | see it from the search results here
but if you go to Google News, this is all
| | 02:38 | of the most recent news for which the
word, waterproofing, has appeared in the
| | 02:42 | title or the body of the story. We
click on RSS, subscribe to the RSS feed
| | 02:48 | instead of the Atom feed, since there
can be many different kind of feeds on a
| | 02:51 | particular site and we get our URL. We
are going to come back to this later and
| | 02:57 | subscribe to this in our Drupal site.
| | 02:59 | First, we have to turn on the module,
Aggregator. So, we'll go back to our
| | 03:03 | website and do that. We do that through
Administer, Modules, scroll down until
| | 03:11 | we get to Aggregator, click on Enabled
and as always, go to the bottom of the
| | 03:15 | page and click Save Configuration. As
with most modules, we are going to have
| | 03:24 | to change the permissions to give our
users the rights to see everything that
| | 03:28 | comes through that news feed. So
we go to Administer, scroll down to
| | 03:32 | Permissions and we see the
aggregator module. We are going to give
| | 03:39 | authenticated users and anonymous
users the right to access our news feeds.
| | 03:43 | Again, Contributing user is also an
authenticated user because this is a group
| | 03:47 | that we added before. Scroll down
to the bottom and Save permissions.
| | 03:54 | Now, let's take a look at how we can
actually add feeds to that aggregator. We
| | 03:57 | go to Administer and search for
aggregator and there it is. Click on it and we
| | 04:03 | have a choice of adding feeds at the top.
We can also add categories, which we
| | 04:08 | won't discuss at this moment. Let's
just add ourselves a feed, click on it, it
| | 04:12 | asks for the title and the URL. We
are going to go back to that one that we
| | 04:17 | found earlier which was about
waterproofing from Google's News search. To
| | 04:22 | subscribe to this feed in our Drupal
site, we go up here, select all of it by
| | 04:26 | doing Command+A on the Mac or Ctrl+A
on the PC and then Command+C to copy on
| | 04:31 | the Mac or Ctrl+C on the PC. We'll
then switch back to our Drupal site, go to
| | 04:37 | Administer, Feed aggregator and Add feed.
| | 04:43 | For a title, I am going to call it
News from Google - Waterproofing. And for
| | 04:50 | the URL, I'll use Command+V or Ctrl+V
on the PC to paste it in. Now, there is a
| | 04:56 | problem with this URL, which has to do
with our particular browser. If we go
| | 05:00 | back to the beginning of it by hitting
Command+A and then Backspace or Ctrl+A
| | 05:04 | and then Backspace on the PC, we see
that it starts with feed. This has to
| | 05:09 | start with http. Most browsers don't
have this issue and in fact, Firefox
| | 05:14 | doesn't. If you are using Firefox, you
won't have to take this additional step.
| | 05:18 | The final option we have here is the
Update interval. This determines how
| | 05:22 | frequently we'll be fetching news from
this URL. Because it is only updating
| | 05:26 | once every 15 minutes, we are allowed
to do no faster than that because if we
| | 05:31 | were allowed to and everybody did,
then it would overwhelm the servers.
| | 05:35 | However, we can't do it less
frequently if we like. I recommend keeping it on
| | 05:39 | 15 minutes because that's no too
frequently to overwhelm the servers but at the
| | 05:43 | same time, it's frequently enough that
somebody, who checks your site several
| | 05:46 | times a day, will generally find new
information whenever they go back as long
| | 05:50 | as there is that new information.
| | 05:52 | Then we'll click on Save. If you want
to pull it in immediately, we'll click on
| | 05:57 | this link here, cron maintenance task
that takes us to our status report and
| | 06:02 | then you say, run cron manually. Now,
when we go over to Feed aggregator, we'll
| | 06:07 | see all of the stories on our website.
Let's go to our ordinary user, Fishy
| | 06:12 | Joe, who we have logged in on the
Firefox browser. If we refresh this page, we
| | 06:18 | see that he now has a Feed aggregator
and when he clicks on it, he can see all
| | 06:22 | of these stories. There are a few
links he'll notice. One of then is he can
| | 06:26 | click on the title of the story itself
and that takes into the original story
| | 06:32 | directly. We'll go back and if he
clicks on News from Google - waterproofing
| | 06:37 | and remember, that's the feed that we
set up, we see all of the news items that
| | 06:40 | were fetched by that feed.
| | 06:42 | Finally, we can look at Sources here.
So, here we can see all of the news
| | 06:46 | stories that came in through our
Google waterproofing feed. If we had other
| | 06:50 | feed setup, we'd see them listed
below with all of their items. There's one
| | 06:54 | other thing that we can do with RSS
feeds and we are going to switch back to
| | 06:58 | our administrator interface to show you.
Here in the administrator interface,
| | 07:03 | we can take this feed and put it
in a block and we'll put that in the
| | 07:06 | right-hand column along with our other
blocks. To do so, go to Administer and
| | 07:12 | then to Blocks. Whenever you create a
feed like this, it shows up as a separate
| | 07:17 | block. As we scroll down, we see it
here, News from Google - Waterproofing
| | 07:25 | feed. We'll bring that up into the
right side bar and save it and voila! We
| | 07:33 | actually see it here in the right-
hand column and indeed, we don't see the
| | 07:36 | entire story; we only see the
headlines, which is yet another way that you
| | 07:41 | could make your site look fresh and new.
| | 07:43 | As with any other block, you could
move that around within the column or you
| | 07:46 | could move it to the left-hand column.
I think I'll put it above the most
| | 07:49 | recent poll. Scroll to the bottom again,
Save blocks and let's switch to our
| | 07:56 | ordinary user just to see how it looks.
And there you have it, we now have
| | 08:01 | Google's waterproofing news
followed by the poll just as we expected.
| | 08:06 | As with most Drupal topics, there
is a section on the Drupal.org site
| | 08:10 | specifically for aggregation tricks. It's at
| | 08:13 | drupal.org/handbook/modules/aggregator.
So, we have learnt how we can subscribe
| | 08:21 | the information in your Drupal site
but you can also publish information that
| | 08:24 | appears on your Drupal site. To show
that, let's go back to our home page by
| | 08:30 | clicking on our Drupal icon up here.
Now, let's move to becoming part of the
| | 08:34 | grand pool of RSS publishers. In
Drupal, you actually don't have very many
| | 08:38 | options for how you publish your
content in RSS. If it appears on your site and
| | 08:43 | is visible to anonymous visitors,
it can be subscribed to via RSS.
| | 08:47 | So somebody, who goes to your site,
would see this RSS tag up here. In this
| | 08:52 | case, we are running on a local machine,
so we see localhost. But of course,
| | 08:55 | somebody, who was looking at it on a
public web server, would see, for example,
| | 09:01 | www.example.com. When they click on RSS,
it adds that rss.xml and they would
| | 09:06 | subscribe in their reader exactly as
they would in any other site. There's one
| | 09:10 | thing that I want to point out here
though. One of our stories, we added to
| | 09:14 | teaser that is text that shows up
before you click Read more and then
| | 09:18 | additional text that shows up after
your click Read more. That carries over
| | 09:23 | whenever you do an RSS feed. The first
Read more showing here, shows where the
| | 09:27 | teaser cuts off. The second Read
more shows up at the end of the content
| | 09:31 | itself, so you can actually cut off
content before the end by adding a teaser break.
| | 09:37 | Being able to subscribe to RSS feeds
tremendously increases the amount of
| | 09:41 | content on your site and can
beautifully compliment your own content.
| | Collapse this transcript |
| Using input filters| 00:00 | One way that vandals attack Internet-
based systems is through a trick called
| | 00:04 | code injection. They find places where
the system's designer has allowed the
| | 00:09 | outside world to provide input and then
put programming code there, instead of
| | 00:13 | entering information in a format that
the developer expected at the least. Such
| | 00:18 | tricks can lead to ugly posts. At
most, they can lead to the attacker
| | 00:22 | completely destroying or gaining
control of your site. In Drupal, you have
| | 00:26 | control over the sort of information
users can enter into posts and comments
| | 00:30 | through a system of input filters.
Drupal includes three such filters, two of
| | 00:34 | which are turned on by default and
you can add your own as you like.
| | 00:38 | To understand input filters, first
we'll create content as the administrator by
| | 00:43 | clicking on Create content and we'll
just say Blog entry. As we scroll down,
| | 00:48 | we'll see a very familiar part where
it says Input format. Click on that and
| | 00:52 | you see the two that are included and
turned on in Drupal by default, Filtered
| | 00:57 | HTML and Full HTML. I am going to
switch now to an ordinary user, Fishy Joe,
| | 01:02 | who is logged in under the Firefox
browser. When Fishy Joe creates content,
| | 01:07 | once again, we'll make it a blog entry,
he actually doesn't have those options;
| | 01:13 | he is only allowed to enter his content
as Filtered HTML. Let's take a look at
| | 01:18 | how that works. We'll switch back to
the administrator. To see the input
| | 01:23 | filters that are available, we go
back up to Administer and then to Input
| | 01:29 | formats. Here, we see we have options
for Filtered HTML and Full HTML. Let's
| | 01:38 | take a look at how Filtered HTML is configured.
| | 01:42 | You can change the name but you can't
change what Roles can use Filtered HTML
| | 01:47 | that's because in Drupal, Filtered
HTML is the basic input format allowed and
| | 01:52 | every user is allowed to use it. Going
down further, you can see a few options;
| | 01:58 | the HTML corrector corrects faulty and
chopped off HTML in postings. So, let's
| | 02:02 | say that somebody who were to enter a
bulleted list, but forgot to close the
| | 02:06 | tag, this would correct that. The
HTML filter makes Drupal take out some
| | 02:11 | certain tags. It also takes out CSS
styles and Java Script events that could
| | 02:16 | hurt your site. The Line break
converter turns ordinary text, which has
| | 02:20 | ordinary line breaks in it, into the
HTML that Drupal expects, so somebody
| | 02:24 | doesn't have to say, <p for a paragraph
tag; they can just hit the Return key.
| | 02:30 | Finally, the URL filter will turn any
sort of URL into a clickable link and
| | 02:35 | again, you can turn these on or off as
you like. Continuing down, we see the
| | 02:39 | guidelines that are printed in front of
the user whenever they enter using this
| | 02:42 | filter. We'll see more of this in just
a moment but for right now, we'll just
| | 02:46 | say Save Configuration. The other
filter that's built in is Full HTML. Let's
| | 02:51 | take a quick look at that by
clicking on the configure link.
| | 02:55 | In this one, you can choose which
Roles are allowed to enter as Full HTML. If
| | 02:59 | you want to allow a particular role
to use that filter, you would obviously
| | 03:03 | click on it and then save at the bottom
of the screen. If none are clicked then
| | 03:07 | none can use it although, of course,
the super user, you as the administrator
| | 03:11 | can use any filter that you like.
Continuing down we see that the options are
| | 03:16 | the same as for Filtered HTML except
that the HTML filter is turned off as you
| | 03:21 | might imagine. Again, Drupal
automatically gives you these formatting
| | 03:24 | guidelines, which are given to the
user when they enter in this format.
| | 03:28 | I am going to go back up and allow
authenticated users to enter in Full HTML.
| | 03:33 | Go back down to the bottom, and click
on Save Configuration. There is one more
| | 03:38 | filter type that is built into Drupal.
It's called PHP. To turn it on, we'll go
| | 03:43 | to Administer, Modules and then down
to the PHP module. This is turned off by
| | 03:51 | default because PHP in content can be
extremely damaging. If you allow PHP to
| | 03:56 | be entered into content and
interpreted by Drupal, it could allow somebody to
| | 04:01 | write malicious PHP that could destroy
pages or even take over parts of your
| | 04:05 | site. But we'll go down and we will
turn it on, I'll show you how to use it
| | 04:09 | responsibly and click Save Configuration.
| | 04:14 | Now, let's go back to our Input formats
by going up to Administer and back down
| | 04:24 | to Input formats. Now you see we have
one more option, PHP code. Let's take a
| | 04:29 | look at some of the options for writing
PHP code. Click on Configure, first of
| | 04:35 | all, we are going to make this
available to authenticated users, also
| | 04:38 | contributing users even though that
group is included in authenticated users.
| | 04:43 | Down here, you'll notice an additional
option, PHP evaluator. This is what lets
| | 04:48 | Drupal actually interpret the code
that somebody has entered. I am going to
| | 04:51 | turn this off for now for a reason I'll
show you in a moment. We'll go down and
| | 04:56 | say, Save Configuration and the
Input formats settings have been updated.
| | 05:00 | Now, let's go back to our ordinary user,
Fishy Joe, and see how that affects
| | 05:04 | him. He is logged in the Firefox
browser. Let's say, he wants to create
| | 05:09 | content, a blog entry. We'll just
call this Test and it's in the Buying
| | 05:16 | category and Body is Test. We continue
scrolling down and we see something we
| | 05:22 | didn't see before, Input format. Here,
we see we can enter Filtered HTML, Full
| | 05:27 | HTML because we turned that on and PHP
code. We'll try PHP code and then we'll
| | 05:33 | go back up here and we'll enter some
PHP code just to see what happens. Don't
| | 05:37 | worry if you don't understand this
code, we'll show you in a minute what it
| | 05:40 | does. It does something very ugly,
not really destructive but something you
| | 05:44 | really don't want somebody to be
putting into your site. It's going to be <?php
| | 05:52 | phpinfo() ?>.
| | 05:59 | Just to make this a little more
obnoxious, let's add <font size="+7">. That is
| | 06:06 | going to make that Test appear really
big and ugly and </font>. Now, let's go
| | 06:12 | down and save it. Ah! We see that big
Test, however, we don't see the PHP code.
| | 06:19 | We need to see the code; we neither see
the code nor what it does. Now let's go
| | 06:23 | back to the administrator and turn that
PHP evaluator back on and then re-look
| | 06:27 | at this. So, we go back to the Safari
browser where the administrator is logged
| | 06:32 | in, go back to PHP code to configure,
scroll down, turn on the PHP evaluator,
| | 06:40 | scroll down further and save the
configuration. Are you ready? It's going to be
| | 06:44 | ugly. We switch over to the Firefox
browser and let's reload this page.
| | 06:49 | Ah! Look at what we have. This is
what that phpinfo function does. Let's go
| | 06:56 | back and turn that off because it is
really ugly and as you can see, somebody
| | 07:00 | who is allowed to use the PHP filter
can actually do quite a bit of damage very
| | 07:04 | easily where at the very least, they
can create some very ugly posts. So, we
| | 07:09 | are going to go back and turn that off.
We go into PHP code and just remove the
| | 07:14 | roles that are permitted to use PHP
code. If you wanted to be extra careful,
| | 07:19 | you would also take off the PHP
evaluator if you didn't want, for example, the
| | 07:23 | administrator to be able to do such a thing.
| | 07:26 | Go down to the bottom and click on
Save Configuration. Now, if we go back to
| | 07:30 | that post and refresh,
| | 07:35 | we see once again, it's like that.
Not quite so ugly but not really great.
| | Collapse this transcript |
| Managing comments| 00:00 | All societies face troublemakers
from time to time and the anonymity the
| | 00:04 | Internet provides encourages people
to display their worst behavior without
| | 00:08 | fear of discovery. Trouble often comes
in the form of abusive or spammy comments.
| | 00:13 | Fortunately, Drupal includes
several features that not only let you
| | 00:16 | control who can comment but also let
you decide which comments should be
| | 00:19 | published and hide or delete
comments that have already appeared. On the
| | 00:24 | lighter side, you can control how
comments appear by default and whether or not
| | 00:29 | your site's members can change those settings.
| | 00:32 | To start off, we are going to create
content as the administrator in the forum
| | 00:36 | by clicking on Create content and
Forum topic. If you are a Lynda.com premium
| | 00:41 | member or have the series on a disk,
you have an exercise file that has the
| | 00:45 | text for this Forum topic. We are
going to go there now by clicking on the
| | 00:49 | Finder and hiding everything else. Go
to the Exercise Files, Chapter 10 and
| | 00:56 | it's 10_04. The name of the file is
forum-post.txt. Here, we'll copy the title
| | 01:04 | by hitting Command+C or Ctrl+C on the
PC and go back to our Drupal interface
| | 01:10 | and paste it in the Subject, Command+V
or Ctrl+V on the PC. We'll do the same
| | 01:16 | thing for the Body.
| | 01:23 | Finally, we'll decide which forum we
want to put this in. The question is what
| | 01:27 | do you love most about living under
water. The most appropriate forum for that
| | 01:31 | I think is, Tips for underwater living.
We'll scroll down to the bottom and we
| | 01:36 | don't have to change anything else;
we'll just say, Save. Very good, we've
| | 01:40 | created our forum topic. Now, let's go
and take a look at what that looks like
| | 01:44 | from the point of view of Fishy Joe, an
ordinary member. We'll go to the forum
| | 01:48 | by typing forum next to our URL and
there we are; Tips for underwater living.
| | 01:55 | That's the name of the forum. Go
in and there is the post that the
| | 01:57 | administrator just made. Click on it
and there it is. Now, let's say that Fishy
| | 02:01 | Joe is in a rambunctious mood and
decides to add a new comment and do it all in
| | 02:06 | caps and say, I HATE THE IDEA OF
LIVING UNDERWATER!!!!1111. And the Comment
| | 02:15 | says, Who Would Be So Stupid To Do
That?!?!?! Fishy Joe previews it, says,
| | 02:23 | yeah, I like saying that and says,
Save, and it appears on the site.
| | 02:28 | Let's go back to the administrative
interface and see what we can do if we see
| | 02:31 | that and decides, you know, we don't
want that on the site. So, we'll switch
| | 02:34 | back and in here, we go to
Administer and Comments. This shows all of the
| | 02:40 | published comments and we see that at
the top and we'd say, we don't like that;
| | 02:44 | there are few things we can do. One is
we can click in the checkbox next to it
| | 02:49 | and then either un-publish the
comment by leaving this as it is and then
| | 02:53 | clicking Update or we could delete it
by selecting that and clicking Update. A
| | 02:57 | second way we can affect this comment
is by going to the Edit link here and
| | 03:02 | then go up to the Administration
link at the top and here, we could just
| | 03:05 | un-publish it by clicking on that
radio button and going down, saying Preview
| | 03:10 | and then save. We are just
going to leave it alone for now.
| | 03:14 | We'll go back to Administer, and
Comments. I want to show you another way that
| | 03:20 | you can stop comments from appearing.
We can do this by going to Administer,
| | 03:24 | and Permissions, and then down to
Comments. Now, you'll notice, we have
| | 03:32 | permissions granted for all the
authenticated user and contributing user to
| | 03:36 | both post comments and post comments
without approval. Let's say, we just want
| | 03:40 | them to be able to post comments but
we want to be able to approve all the
| | 03:43 | comments that comes through. We'll
uncheck these post comments without
| | 03:47 | approval. Go down to the bottom of the
screen, and say, Save permissions. Now,
| | 03:54 | let's go back to Fishy Joe.
| | 03:57 | Let's say that he sees that he has
made a little stink here and wants to add
| | 04:00 | another nasty comment. He says Add new
comment. He says I hate you all!!! You
| | 04:07 | bottom dwellers!!! And then says
Preview, goes down to the bottom and says
| | 04:14 | Save. This time, however, his comment
hasn't appeared on the site because we
| | 04:19 | don't allow comments to appear
without approval and in fact, he gets this
| | 04:23 | message which must make him feel
really bad, your comment has been queued for
| | 04:26 | moderation.
| | 04:27 | Now, let's go back to the
administrator site and see exactly what that means.
| | 04:31 | We go to Administer and Comments and
this link up here Approval queue. This
| | 04:37 | shows all the comments that haven't yet
been published on the site because they
| | 04:41 | haven't received our approval. We
could look at it, of course, by clicking on
| | 04:45 | it. I don't like that, I am going to
go back and say, Delete the selected
| | 04:51 | comment. But right now, we are gong to
publish it and I'll show you why in just
| | 04:55 | a moment. So, we have these two
abusive comments, which for some reason we've
| | 05:00 | decided to leave. Let's say, the
administrator decides to go into the forum and
| | 05:03 | try to make peace. Goes to that same
post, goes to one of the comments and
| | 05:11 | says, you know I am going to reply to
that and say, Why so much anger? Breathe
| | 05:17 | in, breathe out... Try to calm down,
Fishy Joe. And then we'll just say Preview
| | 05:25 | and once again, Save.
| | 05:29 | You'll notice something here. When
you reply to a comment, it indents it in
| | 05:33 | this way. We'll show how you can change
that sort of display, but enough about
| | 05:37 | abuse. Now, let's change how member
see comments including how this is
| | 05:42 | indented. To do that, we stay on
our administrative interface and go to
| | 05:47 | Administer and Content types. Now
remember, this was a forum post. So, we are
| | 05:53 | going to change the way people see
comments in the forum posts by going to
| | 05:57 | forum topic and clicking on Edit. We
are going to take a close look at all the
| | 06:01 | comment settings that are possible in
the forum topics. We click on comment
| | 06:05 | settings and we have a lot of options.
| | 06:09 | First of all, whether or not we allow
comments at all. If we don't want to
| | 06:12 | allow comments in forums, we could
just click on Disabled or Read Only, which
| | 06:16 | would only allow administrators to post
there. Secondly, we can change how they
| | 06:20 | are displayed and when you saw that
indenting, it's because it was a threaded
| | 06:24 | list. I am going to say, Flat list -
collapsed and we'll go back and take a
| | 06:28 | look at how that looks. Let's scroll
down, Save content type, then go back to
| | 06:34 | Fishy Joe's account, reload the page.
So, you can see that we've changed the
| | 06:41 | way that comments appear instead of
being expanded and in a threaded format,
| | 06:45 | they are now flat for most recent to
oldest and to see any one of them, you
| | 06:49 | have to click and then you see the comment.
| | 06:51 | Going back to the administrative
interface, let's edit more ways that people
| | 06:56 | comments in forum topics by clicking
on Edit and Administer, Content types,
| | 07:01 | scrolling down again to the Comment
settings and clicking on that link. So,
| | 07:07 | let's turn it back to Threaded list -
expanded. You can change whether the most
| | 07:11 | recent or oldest are at the top. You
can change how many comments appear on a
| | 07:15 | page, if more than this many comments
are on the page, there will be a link at
| | 07:19 | the bottom that says More, which users
can click on to see the older or newer
| | 07:23 | comments.
| | 07:25 | Finally, we can change Comment controls.
I am going to turn these on above the
| | 07:29 | comments so you can see what a
difference it makes. Scroll down and say Save
| | 07:34 | content type. So, we have changed
whether for not Fishy Joe can affect how he
| | 07:39 | sees comments. Let's go back to his
account and click on that forum topic to
| | 07:45 | see if the change is good. And indeed,
he can now whether or not he sees that
| | 07:49 | as a flat list or he sees it as a
threaded list - collapsed, how many comments
| | 07:54 | per page he sees and so forth. If he
clicks on Save settings, then there you
| | 07:58 | see it. There is this collapsed list,
which is threaded just as he wanted it.
| | 08:03 | There's one more thing we can do as the
administrator to display comments in an
| | 08:06 | interesting way. Let's go back to
the administration interface, click on
| | 08:09 | Administer and then to Blocks. There
is a block that is installed by default
| | 08:15 | when you have the Commenting module
turned on called Recent comments. We are
| | 08:20 | going to move this into the right
side bar along with those other things we
| | 08:23 | have by clicking on that drop-down
menu and moving up to right side bar and
| | 08:28 | then scrolling to the bottom and Save
blocks. Now, if you scroll down the side
| | 08:33 | here, you'll see all of the other
things we had to have before in addition to
| | 08:37 | Recent comments, it shows only the title of
the comment and how long ago it was added.
| | 08:42 | If we go to Fishy Joe's, we'll see
that the same it true. Scroll down the
| | 08:47 | right-hand side and you'll see the
recent comments. If you click on any of
| | 08:51 | these comments, you'll go directly to
it. Here's that why so much anger. Now,
| | 08:56 | before we finish this video, I am
going to go back and clean up all of those
| | 09:00 | abusive comments by going once more
into Administer, Comments and selecting the
| | 09:07 | ones that I don't like, these two, and
delete them. Yes, I really do. Finally,
| | 09:14 | we'll look at the Approval queue and
make sure that we have nothing there that
| | 09:17 | was waiting for approval.
| | 09:19 | As you can see, you have many options
for controlling how comments appear on
| | 09:23 | your Drupal site, including whether or
not they appear in the first place. In
| | 09:27 | addition, there are modules that
will extend these features but Drupal's
| | 09:31 | built-in features for handing
comments should be able to handle pretty much
| | 09:34 | everything that you need to do.
| | Collapse this transcript |
|
|
11. Customizing Your Site's Appearance with Themes and CSSConfiguring your theme| 00:01 | As a Drupal administrator, you'd have
several levels of control over the theme
| | 00:04 | that affects the general appearance of
your site. In fact, you can do quite a
| | 00:08 | lot with the six themes that are built
into Drupal. Some of the things you can
| | 00:12 | change, include the information shown
at the top of every screen besides logo,
| | 00:16 | the shortcut icon that's in the
browser's address bar and whether member icons
| | 00:20 | are included in posts and comments.
| | 00:22 | The first thing that we're going to do
is we're going to change to a completely
| | 00:25 | different theme and you'll notice
some very big changes when that happens.
| | 00:29 | First of all, you may remember that
blocks are actually theme per theme. So,
| | 00:34 | all of the blocks that you've in this
right hand corner are going to disappear.
| | 00:38 | Let's do it now by going to Administer
and Themes and then down to the theme
| | 00:45 | we're going to use.
| | 00:46 | Right now we're in Garland, but I
think I want to change to Bluemarine. It
| | 00:49 | seems appropriate for underwater realty.
So, we click on Enabled to turn it on
| | 00:54 | and then we click on Default, which
makes that the one that shows up for
| | 00:57 | everybody. Scroll down to the bottom
and Save Configuration. Bang! Just as I
| | 01:02 | said, the right hand column is
disappeared because all of those blocks are gone.
| | 01:06 | Also, you'll notice that the text up
here which used to be very big Where damp
| | 01:10 | basements are a feature, not a bug has
actually become small and onto the next
| | 01:14 | line. But basically, all of the
content has stayed in the same place, we have
| | 01:18 | this sticky story up here at the top,
the poll that we had and so forth, all of
| | 01:23 | the stories are there. If we go to the
forum, we see that the forum poster is
| | 01:28 | still there. They may look a little
different, but the content is exactly the
| | 01:32 | same.
| | 01:32 | I want to return this to somewhat the
same functionality as we had previously.
| | 01:36 | So, I'm going to go to Administer
and Blocks and now, you'll notice that
| | 01:40 | Bluemarine is underlined. That's the
theme that we're in right now where as
| | 01:44 | before we were in Garland. If we
want to see what blocks we were using in
| | 01:48 | Garland, we'd just click on here and it
will change the screen temporarily, so
| | 01:53 | we can see exactly what it
looks like with the blocks in place.
| | 01:56 | We could then make a list here if we
wanted to. Well. What order were they in,
| | 02:00 | where did they appear and so forth, but
we're not going to do that. We're just
| | 02:03 | going to switch back to Bluemarine and
we're going to rebuild the site as we
| | 02:06 | want it. We'll scroll down and take a
look at all of the different blocks that
| | 02:10 | are available to us. Let's put our
Active forum topics up in the left sidebar
| | 02:15 | towards the top.
| | 02:16 | So, we move that popup that way and as
you can see, it popped it up into the
| | 02:20 | place where it's going to go. Go back
down to all of these disabled blocks and
| | 02:24 | decide what else do we want. We still
have recent comments on the right side
| | 02:28 | bar. Recent blog posts as well on the
right sidebar and we've decided we're no
| | 02:33 | longer running that promotion we were
running before. So, we'll leave that
| | 02:35 | disabled.
| | 02:37 | We'll put the poll in the right side
bar as well and then News from Google at
| | 02:41 | the bottom there. If we scroll up here,
we can rearrange exactly where those
| | 02:46 | blocks appear by grabbing these icons
and dragging them as we like. I'm going
| | 02:49 | to put the News at the bottom and
make sure that the poll is at the top,
| | 02:53 | because I like the way it looks. We'll
move the Active forum topics down below
| | 02:57 | our navigation menu.
| | 02:58 | Again, I'm just playing around here;
you can setup the site however you want.
| | 03:03 | We'll scroll down to the bottom and
Save Blocks. There, now we'll go back to
| | 03:07 | our homepage, I like the way that looks.
We'll keep it that way. But there's
| | 03:11 | much more that we can do within the
theme itself, to find out, we click on
| | 03:15 | Administer and Themes once again. Now
remember, we're in the Bluemarine theme.
| | 03:20 | So, I'll click on configure next to
that theme. From here, there are many
| | 03:24 | changes that we can make. One of them
is we could put user pictures in posts.
| | 03:28 | You may remember from the Profile
settings that individual users are allowed to
| | 03:32 | upload pictures of themselves if we
permitted them to as we did. Let's put that
| | 03:37 | in posts and in comments. Now,
this search box is not available.
| | 03:42 | First we're going to go down and save
this and then I'm going to make that
| | 03:45 | search box available by turning on
the Search module. So, we click Save
| | 03:49 | configuration, Administer and back to
Modules. As we scroll down we'll see,
| | 03:57 | indeed, there's a Search module that
we can turn on and save. But you'll
| | 04:02 | notice, it still hasn't showed up in
this theme and I'll go to the front page
| | 04:06 | to see you can see that.
| | 04:07 | It doesn't show up anywhere on that
page because we've to make it appear in the
| | 04:11 | theme, again we go Administer and
Themes and configure Bluemarine which is our
| | 04:18 | current default theme. Now, we can
click on the search box and make it
| | 04:22 | available. Scrolling down further,
we're going to add a couple of things. One
| | 04:27 | of them is the default logo up here,
this is actually the Drupal default logo
| | 04:33 | and much as I love it, it's
not appropriate for our site.
| | 04:36 | The same goes with this little thing in
the address bar, which is known as the
| | 04:39 | shortcut icon. I've prepared two icons,
which will fit in those places, and
| | 04:43 | you'll find them if you're a subscriber
to lynda.com as a premium member or if
| | 04:47 | you receive this course on a disk in
the Exercise Files. Scrolling down to the
| | 04:52 | bottom, we're first going to change
the custom logo. We'll choose a file by
| | 04:57 | clicking on Choose file. In our case,
it's in Chapter11, in the first video and
| | 05:03 | it's called 11_01-logo.jpg,
click on that and then click Choose.
| | 05:09 | We also want to make sure we don't use
the default logo since we're uploading
| | 05:13 | this one. So far with added user
pictures to posts and comments, we've added a
| | 05:18 | search box and we've changed the
default logo. That's a lot to do at once, so
| | 05:22 | let's save the configuration and see
how that looks. Aha! There's our new logo
| | 05:28 | and there's our box. One more thing
we're going to do is to change that little
| | 05:32 | shortcut icon, so it's no longer what's
called the Drupalicon. Instead it will
| | 05:36 | be something that we like.
| | 05:38 | So, we'll scroll down and do the same
thing for the shortcut icon settings.
| | 05:42 | Again, we choose a file and it's in 11_
01-shortcut.jpg. This file should be 16
| | 05:50 | pixelsx16 pixels and while it doesn't
look like much here, you'll see when it
| | 05:55 | shrunk down, it looks very much like
our logo. We click on Choose, remember to
| | 06:00 | take off the default shortcut icon and
Save Configuration and there it is, it
| | 06:05 | echoes our main logo.
| | 06:07 | What about that other setting we made
which allows people to show their user
| | 06:11 | pictures in posts? Well, first of all
let's go back to the main page and see
| | 06:15 | where such a thing would go. Here we
have a post by admin, here is one by
| | 06:20 | fishyjoe, here is another one by admin.
We've a lot of posts on this site by
| | 06:24 | admin. So, in some admin, I'm going to
upload my picture so that we'll see it
| | 06:29 | next to all of those posts. To do so,
I'd go to my own accounts and edit it and
| | 06:36 | scroll down to the bottom where we have
a place where we can upload a picture.
| | 06:39 | Choose the file and once again in our
Exercise Files, we've something called
| | 06:44 | Admin icon. Yes, that is me. Sad I
know. We'll choose it and save it. Now,
| | 06:55 | let's go back to the front page and
we'll see my picture next to all of my
| | 06:58 | posts, it looks good. Now, there is
one feature on some themes, which isn't
| | 07:03 | available on this one, but I'm going to
show it to you. If we go back up to the
| | 07:07 | top of the page and go to Administer
and then back down to Themes, let's choose
| | 07:13 | the Minnelli theme.
| | 07:14 | The Minnelli theme has an unusual
feature which is based on some programming
| | 07:18 | called farbtastic that lets you change
colors. Scroll down, Save Configuration
| | 07:24 | and let's take a look at the
configuration options for Minnelli by clicking on
| | 07:28 | Configure. If you see this color wheel,
we can actually change the color set
| | 07:34 | that appears. This one is called Cold
Day and it has all sorts of blues, there
| | 07:38 | is a sort of green theme here.
| | 07:40 | Let's leave the green one on, just to
see what it looks like. Scroll down to
| | 07:43 | the bottom and Save Configuration.
There we have it. As we go through the site,
| | 07:48 | you'll see that everything has changed,
the colors of the links and so forth
| | 07:52 | based on that theme. However, since we
didn't upload our special icon here or
| | 07:57 | move the blocks over, everything else
has been removed. I'm going to go back to
| | 08:00 | Administer and Themes and switch back
to Bluemarine, just so we can get back to
| | 08:06 | where we were.
| | 08:07 | Scroll down to the bottom and save
configuration. Finally, we will take a look
| | 08:11 | at what it looks like in our friend
fishyjoe's account. He's logged in the
| | 08:16 | Firefox browser. Click on the icon to
bring us back to the homepage, boom! He
| | 08:22 | sees it pretty much the way we do.
Finally, let's say you want to make changes
| | 08:26 | that will affect all of the themes on
your site, so that people can move from
| | 08:29 | one theme to the other and still see
for example this slogan, Where damp
| | 08:34 | basements are a feature.
| | 08:35 | We'll go back to our Administrative
interface, go to Administer and Themes once
| | 08:41 | again and click on Configure.
You'll notice we've Bluemarine, Garland,
| | 08:46 | Minnelli, the three themes we turned on,
but we also have this Global Settings.
| | 08:50 | If we wanted user pictures in post to
appear in every theme including themes we
| | 08:54 | add later, we'd check this here and
that would apply to every new theme that's
| | 08:59 | added to our system. We're not going
to do that, so we'll just scroll down to
| | 09:03 | the bottom and say Save Configuration again.
| | 09:07 | On second thought, I don't like having
my picture on every post; it's a little
| | 09:11 | too repetitive. So, we can go back at
anytime and make any changes we want by
| | 09:15 | going to Administer, Themes to
whichever one is the default, in this case
| | 09:20 | Bluemarine and let's remove that in
posts, but we'll keep it in comments.
| | 09:24 | Scroll to the bottom again and save
configuration. Back to the homepage and
| | 09:29 | there we go.
| | 09:30 | Finally, when you're done messing
around with the configuration, I'd like to
| | 09:34 | encourage you to look once again at
your site and see if it looks as good as
| | 09:38 | you really wanted. When I look at
this site for example, I see it's not
| | 09:41 | perfect, but I know I can make it
better with just one or two small changes.
| | 09:45 | The one change I can make very easily
is to get rid of this dark blue block in
| | 09:49 | here. You might remember, this is the
mission statement and we can just take
| | 09:53 | that out of this theme by going to
Administer, Themes, Bluemarine, Configure
| | 10:00 | and remove the mission statement.
| | 10:02 | Scroll down to the bottom and say
Save Configuration. Now, that's something
| | 10:06 | that only shows up on the homepage. So,
we'll go back to the homepage here and
| | 10:11 | good, it's gone. I rather like that
better because then the most important
| | 10:14 | thing in the page is this title up at
the top which is what we really want to
| | 10:18 | say to somebody. Let's go and take a
look at how it looks on fishyjoe's account.
| | 10:22 | Once again, we switch to Firefox, click
on the logo and it's gone, good. I want
| | 10:27 | to show you one other thing. We've been
switching back and forth between Safari
| | 10:31 | and Firefox for a while and if you
switch back and forth, you'll notice that
| | 10:35 | they look very slightly different. You
see it especially in the type, look at
| | 10:39 | the type Welcome to your new home as
I switch. It grows in shrinks and the
| | 10:44 | layout sort of grows in shrinks as well.
| | 10:47 | Your site will look slightly different
depending on several factors. For one,
| | 10:51 | which browser you're using, for
another, the computer you're using, whether
| | 10:55 | it's a Mac or PC or some other platform,
third, the resolution of the monitor.
| | 11:00 | So, I'd recommend that everybody take
a good look at their site on several
| | 11:04 | different monitors in several
different computer configurations and several
| | 11:08 | different browsers.
| | 11:10 | The options you've to change a theme
through its configuration windows really
| | 11:14 | only scratch the surface. For more
profound changes, you can change a theme's
| | 11:18 | graphics or Style Sheets or just
download a whole new theme. But as you can see
| | 11:23 | you can do a lot with the
themes that are built into Drupal.
| | Collapse this transcript |
| Changing your theme's graphics| 00:00 | Drupal's web based interface lets you
change a few basic bits of your site's
| | 00:03 | appearance through the theme
administration page. But sometimes, you want to
| | 00:07 | keep a theme's basic layout and
typography, but just change a few of the
| | 00:11 | graphics it came with. I found that's often
the case when I download third-party themes.
| | 00:16 | Note that you'll need right level
access to your server folder where the Drupal
| | 00:20 | installation is location. If you don't
have that already, talk with your system
| | 00:24 | administrator before going forward.
The first thing that we're going to do is
| | 00:28 | we're going to switch to another theme.
We'll go up to Administer and Themes
| | 00:34 | and the one we'll select is called Pushbutton.
| | 00:37 | We're going to use this one because I
happened to know that it contains a lot
| | 00:41 | of additional graphics including
some that we can change. Go to Save
| | 00:44 | configuration and there we are, this
is the Pushbutton theme. You see at the
| | 00:49 | beginning of every block, we have
this little arrow up here and I want to
| | 00:52 | replace that with something a little
bit more colorful. So, that's what we're
| | 00:55 | going to do.
| | 00:56 | To do so, we have to go to the Drupal
installation directory. I go over here,
| | 01:01 | click on Finder and go down to hide
others, so I can see my desktop. I already
| | 01:07 | have my Drupal folder open here. For me,
that's in the Sites directory, but for
| | 01:11 | you, it will be wherever you first
install Drupal. I also have opened the
| | 01:15 | folder that contains the Exercise Files.
This is the graphic that we're going
| | 01:19 | to use in place of the one I just pointed out.
| | 01:21 | Let's go back to our Drupal
installation directory and find all of the files
| | 01:25 | that make up that theme. You'll find
them in themes, Pushbutton. Then to make
| | 01:30 | this a little bit easier to figure out,
we'll sort by type of file, right up
| | 01:34 | here. Make the window a little larger,
so we can see everything. Since it's
| | 01:39 | sorted by type of file, all of the
cascading Style Sheets for example are in
| | 01:43 | one place, all of the graphics are in
one place and all of the PHP files that
| | 01:50 | describe pages within
this theme are in one place.
| | 01:53 | Looking around, I just graphically see,
ah! That looks like the one that I
| | 01:57 | want. Let's see if there's any other
that looks like that. No, that appears to
| | 02:02 | be the one I want. We could just do
this by trial and error, by dragging this
| | 02:06 | into its place. But I'm going to show
you another way to figure out, if that's
| | 02:09 | actually the graphic that you want.
| | 02:11 | To do so, we go back to our Drupal
administration. On the Mac, I'm doing that
| | 02:16 | by hitting Command+Tab and going back
to the web browser. We're going to look
| | 02:21 | at this page in its source, we know
that this graphic is right next to the word
| | 02:25 | Admin which is right above the phrase
My Account. We go up to View and View
| | 02:30 | Source, wherever it is on your browser
and then I'll just quickly do a find by
| | 02:34 | hitting Command+F or Ctrl+F and
search for that phrase, My Accounts.
| | 02:39 | Aha! Now we see here that admin is
between some H3 tags, I'm going to guess
| | 02:46 | that that's actually the tag that
controls whether or not that little graphic
| | 02:50 | appears. If you're good with CSS, you
may want to dig further as it happens,
| | 02:54 | I've researched this one already and I
know that that's the place. We'll close
| | 02:58 | that out and then go back to our Finder.
Hide everything else and take a look
| | 03:04 | at the CSS files that make up this theme.
| | 03:07 | Scroll down until we find it, there
they are at the bottom. In every theme,
| | 03:11 | you'll have one main CSS file called
style.css. In this particular theme, you
| | 03:17 | also have style-rtl. That means right
to left, for when people are using an
| | 03:22 | alphabet that goes from right to left
such as Hebrew. We'll open this up in a
| | 03:26 | Text Editor and now I'm going to search
for that H3 tag and see if that's where
| | 03:30 | the graphic actually is.
| | 03:32 | I hit Command or Ctrl+F, type in H3
and find the next one. Well, we don't see
| | 03:37 | any graphic showing here, so let's
find the one after that. We don't see any
| | 03:41 | graphics there, so we keep going. Aha
! Here we have a graphic showing up,
| | 03:48 | icon-block.png. Is that the same one we
identified before? Scrolling up to see
| | 03:54 | it, yes it is. We throw that away
either by dragging it to the trash or on the
| | 03:59 | PC, right clicking and choosing Delete.
| | 04:02 | We then go down to the graphic we have
and give it the name that we need, in
| | 04:06 | this case icon-block.png. Very good,
now let's go back to our site and see if
| | 04:12 | that change actually took place. All
we need to do is reload the page and
| | 04:18 | Walla! We've changed the little
graphic. The same is true for the other
| | 04:22 | graphics on the site. It may take a
little bit of detective work to figure out
| | 04:25 | what the graphics are, but once you
can do that, you can change pretty much
| | 04:29 | anything you see in any theme on Drupal.
| | 04:32 | Before we finish, I'm going to go back
and change our theme back to Bluemarine.
| | 04:39 | We save the configuration and we're
back where we started. The last step in the
| | 04:43 | process is to play with the results
until you like what you see. Ultimately,
| | 04:48 | you might decide that you need a
completely different base theme or a different
| | 04:51 | configuration of the theme you have.
| | 04:53 | But now you have all the tools that
you need to change your theme and its
| | 04:57 | graphics.
| | Collapse this transcript |
| Finding and installing a new theme| 00:00 | Let's say you have played around with
the four basic themes and two variations
| | 00:04 | that were installed with Drupal, but
still aren't satisfied. There are many
| | 00:07 | other themes that you could find on
drupal.org and themegargen.org that are
| | 00:11 | free and available for download.
| | 00:13 | Once you found a theme you like, you
will need to download it to the themes
| | 00:16 | folder in the Drupal installation on
your server and on packet from it's
| | 00:20 | compressed format. You will need
right level access to that folder. If you
| | 00:23 | don't have it already talk to your
system administrator before proceeding.
| | 00:27 | Once there, a few touches in Drupal web
-based administration pages makes the
| | 00:31 | theme available and further tweaks/
configure it to your liking. To take a look
| | 00:35 | at themes we are first going to go
into Administer and Themes. From this page
| | 00:40 | of course you see a list of all of the
themes that you have available to you
| | 00:44 | that is the ones that are
installed in your Drupal folder.
| | 00:46 | You will also notice this line here:
To change the appearance of your site a
| | 00:50 | number of contributed themes are
available. That link goes directly to the
| | 00:53 | drupal.org web page, which has a list
of themes. If you are logged into the
| | 00:58 | site, you can filter those themes by
the version of Drupal that you have and I
| | 01:02 | recommend that you do that because the
earlier versions of Drupal themes won't
| | 01:06 | work with your current version and in
fact there may even be versions after yours.
| | 01:10 | For example 7.whatever while you have 6.whatever.
| | 01:14 | Besides the drupal.org site, there is
another sites that has many themes. It is
| | 01:19 | themegargen.org. themegargen.org has
one advantage which is that you could see
| | 01:24 | the theme very easily simply by
clicking on it. It reloads the Theme Garden
| | 01:29 | site itself into that theme. Wherever
you go to find your themes, I recommend
| | 01:34 | you spent a lot of time going from one
to the other and become familiar with
| | 01:38 | the similarities and differences among
them as well as what might work best for you.
| | 01:42 | Try to ignore the large graphics that
you see because of course those can be
| | 01:46 | changed very easily and we will tell
you how to do so elsewhere in the series.
| | 01:50 | Let's talk a little bit about qualities
that differentiate themes. This one is
| | 01:54 | a two-column theme with the side bar on
the left. That's the more common format
| | 01:59 | although you do sometimes find them
with the column on the right as in this
| | 02:02 | theme Andreas. Here is that column on the right.
| | 02:05 | In three column themes, there is still
some variations as to where the columns
| | 02:08 | can go. We have already seen the three-
column theme which has a left column and
| | 02:12 | a right column but that's not always
the case. For example, the Marinelli theme
| | 02:17 | has both columns on the right and the
main content area on the left. One other
| | 02:22 | thing that differentiates themes one
from the other is whether there are fixed
| | 02:26 | or fluid columns. I can show you
what I mean by going to a theme called
| | 02:30 | lightfantastic. As we change the size
of the window, we can tell that it's a
| | 02:34 | fixed column theme because as we
bring the window in, the right column just
| | 02:38 | gets cut off and the center column
eventually gets cut off as well without any
| | 02:42 | change to the layout.
| | 02:44 | On the other hand a fluid column
theme such as nista will change the way it
| | 02:49 | looks as you move the sides of the
window in and out. So that everything stays
| | 02:52 | on the page, just like that.
| | 02:56 | Some other features that differentiate
themes or whether or not the theme is
| | 02:59 | re-colorable. We have already seen
that and in fact our default theme garland
| | 03:04 | is re-colorable. If you go into
configure garland you will see a color wheel
| | 03:07 | that will let you change the color of,
for example the header area and the
| | 03:11 | links and so forth directly from the
theme. You don't have to go and change the
| | 03:15 | CSS or Cascading Style Sheets
document as you do with other themes.
| | 03:19 | Finally, there are themes which have
additional areas. One example of that is
| | 03:24 | this one called ability which I am
showing in the drupal.org website. The site
| | 03:28 | is having, it's three columns down here.
It has two additional columns up here
| | 03:33 | and in fact this one has more at the
bottom. You can actually have many, many
| | 03:37 | layout areas in a theme and in each one of
those areas you can move blocks or content.
| | 03:42 | Finally you may decide to go beyond
drupal.org and themegargen.org and in fact
| | 03:47 | there are commercial companies that
offer Drupal themes, some of them for pay.
| | 03:52 | To find them go to google.com and do a
search for Drupal Themes. There you will
| | 03:58 | find not only readymade themes but
also service providers who will create and
| | 04:02 | adapt themes for you.
| | 04:04 | Okay, so we have decided that we want
to get a new theme but how exactly do we
| | 04:08 | get it. Well, that's actually very easy.
We go to any of those places and we
| | 04:13 | simply download it. I have decided
that the theme I want to use is called
| | 04:16 | Andreas 02. It was designed by Swedish
designer Andreas Viklund who has kindly
| | 04:21 | released the design for free for all
users including commercial sites. And in
| | 04:25 | fact many of these themes are
released under the new public license or some
| | 04:29 | other source license. So you are free
to download and use them without paying
| | 04:33 | any royalties and you are
free to change them as you like.
| | 04:36 | To find them, we are going to go to
drupal.org/project/themes and in this case
| | 04:43 | I know it's on the first page, I am
just going to search for andereas02 and
| | 04:48 | there we are. Now, we get to the fun
part. Downloading and actually installing
| | 04:52 | the theme. You download it by simply
clicking on the Download link. There are
| | 04:57 | small files typically less than 200k,
so it shouldn't take long to download
| | 05:01 | them. Once it's on you computer, go
to your Desktop. On the Mac, I am doing
| | 05:04 | that by clicking on the Finder and
then hiding everything else and simply
| | 05:08 | double-click on the Archive.
| | 05:10 | That gives you a folder. That folder
can go on one of two places on your site.
| | 05:14 | You may think that new theme goes into
that themes folder. But that's actually
| | 05:18 | only for themes that came downloaded
with Drupal. If you put it in there it
| | 05:22 | won't be updated properly with
Drupal 6's automatic updates.
| | 05:26 | A better place to put it is in sites,
default, assuming you are only running
| | 05:31 | one Drupal site on your Drupal
installation and in here in a folder called
| | 05:35 | themes. However, the installer will
lock this folder. On the Mac you can see
| | 05:39 | that by this little
cannot write symbol down here.
| | 05:42 | So let's go back one and unprotect
that default folder for a moment. On the
| | 05:47 | Mac, you will do that by going up to
File and Get Info. On the PC, you will
| | 05:52 | right-click and get Properties. Then
go to Sharing & Permissions. You have to
| | 05:57 | unlock it and enter your password and
change Read only to Read & Write. We are
| | 06:03 | going to be changing this back though,
so remember that you did that. As a
| | 06:06 | reminder, I like to leave this window open.
| | 06:10 | We can then go into that default folder,
create a New Folder which we will call
| | 06:14 | Themes and put Andreas02 into that
folder. Now just as reminder we are going to
| | 06:21 | go back, take default and make it Read
only again and then close that window.
| | 06:27 | All right, so we have installed the
theme, but we haven't yet turned it on. So
| | 06:31 | I am going to go back to my browser,
close out this window and go to my site.
| | 06:37 | To my case it's simply localhost. Go to
Administer and Themes and there we have
| | 06:44 | it. It shows up in our Themes List. I
am going to make that the default. Scroll
| | 06:50 | to the bottom and Save your
configuration. We have a new theme that we have
| | 06:55 | downloaded.
| | 06:56 | As always when you switch to a new theme,
the blocks that you had set up don't
| | 07:00 | necessarily carry over, we do still
have out Poll block here but you will
| | 07:04 | notice the Navigation menu which we
were used to having in the upper left-hand
| | 07:08 | corner right handy is now at the
bottom. So we will have to go back and do
| | 07:12 | Administer and Blocks and change the
blocks around however we want. We are not
| | 07:18 | going to spend time doing that now,
because we are eventually going to move
| | 07:20 | back to the Bluemarine theme.
| | 07:22 | Now just to check this theme, I am
going to look at it as an ordinary user. You
| | 07:26 | might remember our user fishyjoe. His
account is open in Firefox. So I will
| | 07:30 | switch to Firefox by hitting Command+
Tab on the Mac and reload the page. As a
| | 07:36 | last step, I am going to go back and
clean this all up, because I decided I
| | 07:41 | really like the Bluemarine theme and I
am going to stick with it. So I switch
| | 07:44 | back to my administrative interface,
going to Administer and back down to
| | 07:49 | Themes, change to Bluemarine. Now there
is one other thing, I am actually going
| | 07:53 | to throw away the files that I just downloaded.
| | 07:56 | So I click enabled to make sure that's
it not enabled. If it is enabled then I
| | 08:00 | throw away the file that could cause
some problems, especially if for example a
| | 08:05 | user has switched to that theme as
their own personal choice and then found it
| | 08:08 | wasn't working. I go down to
the bottom and Save Configuration.
| | 08:13 | Then I go back to my Finder, Hide
others, open up that folder again, open up
| | 08:19 | themes and I can just take this and
throw it away. On the Mac that's done by
| | 08:24 | dragging it to the Trash and on the PC
by right-clicking and selecting Delete
| | 08:28 | and then just to make sure I am going
to go back and take a look at the site in
| | 08:32 | fishyjoe's view by reloading the page.
| | 08:35 | Yup, it looks exactly as before. For
all the difference the theme makes, it's
| | 08:40 | amazingly easy to download and install
themes in Drupal and you can't do much
| | 08:44 | damage to your site by trying them
out one after the other. So when you are
| | 08:48 | developing a site, get used to
installing themes and be prepared to modify
| | 08:52 | those themes so that they work best for you.
| | Collapse this transcript |
| Understanding Cascading Style Sheets (CSS)| 00:00 | Drupal makes extensive use of
Cascading Style Sheets or CSS to control such
| | 00:05 | matters as type style, bulleted list,
graphic placement and column width. We
| | 00:10 | will show how a small style sheet
change can have a big affect on your site's
| | 00:14 | appearance, because CSS is so
powerful we recommend you tread lightly when
| | 00:19 | playing when playing with CSS files
and always keep a backup copy so you can
| | 00:23 | return to where you
started if you make a mistake.
| | 00:26 | CSS is a big subject and lynda.com
offers much more information on both its
| | 00:30 | technical side and using CSS for design.
Visit the lynda.com site for several
| | 00:35 | courses to continue your CSS studies.
For this video we are going to be using
| | 00:40 | the Firefox browser because we are
going to be looking at a tool that only
| | 00:44 | installs into Firefox and isn't yet
available for safari at the time that we
| | 00:48 | are making this video.
| | 00:49 | The tool that we are going to be using
is called Web Developer and you can get
| | 00:53 | it chrispederick.com/work/web-
developer. Once there, you would click to
| | 01:01 | download and install it as you would
any other add-on for Firefox. There is one
| | 01:05 | other tool that is similar to Web
Developer called Firebug, which also runs on
| | 01:10 | Firefox. We won't be looking at it, but
if you would like to check it out, it's
| | 01:13 | at getfirebug.com.
| | 01:16 | Okay, so let's take a look at our theme.
We will close out this window and go
| | 01:20 | back to our drupal folder. This
will be in the same place as where you
| | 01:23 | installed Drupal in the first place.
For us, that's in our sites folder and we
| | 01:28 | already have it open. The theme that
we are going to be working on is the
| | 01:32 | Bluemarine theme, which was installed
with Drupal. So it will be in the themes
| | 01:35 | folder as opposed to in one of the
sites folders. We will open it up and open
| | 01:40 | up bluemarine.
| | 01:41 | The actual file we will be looking at
is called style.css. In Drupal style.css
| | 01:47 | is the main CSS file. However, it may
call many others and you will see that
| | 01:52 | when we look at this file in Web
Developer. In this case style-rtl means right
| | 01:57 | to left. Drupal supports many languages
including those that read from right to
| | 02:01 | left and often there will be
separate style sheet for those languages.
| | 02:05 | Generally speaking they will be labeled
-rtl. Since we are going to be playing
| | 02:10 | around with this style, we want to back
it up. I am going to highlight it and
| | 02:13 | press Command+C or Ctrl+C on the PC
and then just paste it on our Desktop by
| | 02:17 | hitting Command+V or Ctrl+V.
| | 02:20 | Great! Now we can play around with
this style sheet. To do so we are going to
| | 02:24 | switch back to our interface here and
turn on Web Developer by going up to
| | 02:29 | Tools, Web Developer and CSS. There are
two particular options here that I have
| | 02:35 | found very useful. The first is View
Style Information. With that turned on,
| | 02:40 | when you point at any part of your
website, you will see that it highlights the
| | 02:43 | structure of the website and above in
this little bar it tells you a little bit
| | 02:48 | about the CSS that affects
that part of the website.
| | 02:51 | When something is highlighted and you
click, Firefox opens a little window in
| | 02:56 | the bottom, which is resizable. Inside
that window, you will see information
| | 03:00 | about the CSS that controls the part
that you clicked. That's very helpful in
| | 03:05 | figuring out exactly what you want to
change, in order to change a specific
| | 03:08 | part of your site.
| | 03:09 | But there is another tool in Web
Developer that will help you even more. Let's
| | 03:13 | close this out first, go back up to Web
Developer toolbar, turn off View Style
| | 03:19 | Information and go down instead to
Edit CSS. Again that opens up a little
| | 03:26 | window at the bottom, which lists all
of the CSS files that affect this page.
| | 03:31 | Now you remember I mentioned style.css,
but there are all of these other CSS
| | 03:35 | files that helped to build this page.
| | 03:38 | Some of them are called in by modules.
For example, the forum module calls in
| | 03:41 | forum.css and the styles that are
listed in here only affect the forums. Going
| | 03:48 | back to style.css, I am going to make
this window just a little bit bigger so
| | 03:51 | we can see some more. Here we can
actually change specific CSS on this side.
| | 03:56 | Now we are not making permanent changes.
These are just temporary changes to
| | 04:00 | show us what's going to happen
if we make changes permanently.
| | 04:03 | So for example, let's change background
color. Instead of #fff, we will change
| | 04:07 | it to #ooo. Wait a second and you will
see that this is the part that would be
| | 04:12 | changed. Another way that you can
bring up that information quickly is let's
| | 04:16 | say that it is not refreshing quickly
enough for your taste. Type it in and
| | 04:20 | then click on this little button here
Apply and that will very quickly bring it
| | 04:23 | up. To return your CSS files to
normal, just click on this Reset All.
| | 04:28 | Finally, once you have made the
changes that you like, you can go up to this
| | 04:31 | disk icon and say Save. Now make sure
that you have the correct style sheet
| | 04:36 | selected, it will tell you up here the
name of the style sheet you are editing.
| | 04:39 | Sometimes Web Developer will switch
from tab to tab, especially when you do a
| | 04:44 | Reset All. CSS switch to Aggregator,
you will have to go back to style.css.
| | 04:49 | We are going to save this style.css
file as style-NEW.css, just so that we can
| | 04:54 | keep it distinct from the old one and
then click on Save. We will go back to
| | 04:59 | our Desktop and hide everything else.
Now let's say we want to apply this new
| | 05:04 | style into our actual site. Well, to
replace the style sheet, we would throw
| | 05:09 | away the one that's in our theme
folder. Remember, we did save a backup.
| | 05:13 | I will drag that to the Trash. Of
course on the PC you would use right-click
| | 05:16 | and Delete. Drag this into the folder,
rename it as the old one, style.css and
| | 05:23 | there. We have been able to play around
with style sheets and see exactly what
| | 05:27 | in the CSS file affects the page
and then installed a new style sheet.
| | 05:32 | This video only touched on the very tip
of the iceberg that is CSS, by changing
| | 05:37 | one small attribute and in fact we
have changed it back. So by replacing the
| | 05:41 | file we didn't make any changes. But
the truth is style sheets can affect
| | 05:45 | Drupal theme appears much more
profoundly than just about any other facet of
| | 05:49 | Drupal development. For a Drupal
webmaster, time learning CSS is time well
| | 05:54 | spent.
| | Collapse this transcript |
| Deciphering CSS files| 00:01 | One of the most effective ways you
can customize a Drupal site to make it
| | 00:04 | distinctively yours without installing
a new theme is to tweak the theme CSS.
| | 00:09 | However, a theme CSS or Cascading
Style Sheets are typically contained in
| | 00:13 | several files in a complex
hierarchy that can be hard to understand.
| | 00:18 | We will show you how some of your
options for changing themes appearance
| | 00:21 | through CSS are done through the
Firefox plug-in tool, Web Developer, which we
| | 00:26 | downloaded previously. To make these
changes we are going to go into Tools, Web
| | 00:31 | Developer, CSS and Edit CSS. This is
taking CSS directly from the website that
| | 00:38 | we are looking at and the changes that
we make would not be permanent until we
| | 00:42 | save them by clicking on this disc icon.
| | 00:44 | In addition if we decide we want to go
back to the original appearance we can
| | 00:48 | do so by clicking on this Reset All
button. Finally the page will update
| | 00:53 | automatically after a few seconds, but
if it is not or would like it to do more
| | 00:57 | quickly we can click on this little
icon to apply them immediately. As you look
| | 01:01 | at the Web Developer interface you
will notice all of the CSS files that are
| | 01:05 | affecting this page are listed in tabs.
The main one is style.css. Whenever you
| | 01:11 | revert this using this icon it will
switch back to aggregator and make sure go
| | 01:16 | back to style.css so that
you can edit the correct file.
| | 01:20 | Now let us take a look at the file
itself. The main part of any page is the
| | 01:24 | Body tag, which you see here at the top
of the CSS file. Things that you change
| | 01:29 | within the Body tag will change pretty
much the entire page. For example, let
| | 01:33 | us change this font size from 76 to 90.
Wait a second and you will see that all
| | 01:39 | of the text on the page has changed.
That is because the Body tag drools over
| | 01:43 | most everything else on the page.
Changing it will have some very severe
| | 01:46 | repercussions. So let us change that back.
| | 01:49 | Again I am hitting Command+Z or Ctrl+
Z on the Windows machine. Going down a
| | 01:52 | little further let's be a little bit
more specific. We are going to just change
| | 01:57 | these links. You will notice right now
there are certain colors and when you
| | 02:00 | hover over them they become underlined.
That is done through CSS. We are going
| | 02:04 | to scroll down and here we have the A
tag, one called a: link, one called a:
| | 02:10 | visited and one called a: hover.
| | 02:12 | The a: hover one, if you look at the
CSS, you can see that that is where the
| | 02:16 | underline is coming from. Let us
change it to blink. Now let us see what
| | 02:21 | happens. We have given it a second to
apply, we go up over a link and you can
| | 02:25 | see when you hover over a link now it
blinks. That is ugly; I am going to undo
| | 02:30 | that by hitting Command+Z.
| | 02:32 | Continuing further down the page you
can see how CSS affects the way that blogs
| | 02:36 | are actually laid out on the page. We
will scroll down until we get to this
| | 02:41 | Page layout blocks/IDs. Let us scroll a
little bit further and see what we can
| | 02:46 | change. There we go header background
color. Let us see what that changes. We
| | 02:50 | will change it to something very
different. Let's say 333. And we can see
| | 02:55 | immediately it changes this top area.
| | 02:57 | That is good to know because the color
and dimensions of various layout parts
| | 03:01 | of the page can have a big effect and
differentiate your site from the original
| | 03:06 | theme, but we are going to just change
it back for now. I mentioned something
| | 03:10 | about the dimensions of blocks and in
fact that is something that CSS also
| | 03:14 | controls. See this padding; let us take
a look at what would happen if we were
| | 03:18 | to change one of these to
let us say, 6em instead of 1.2.
| | 03:22 | Take a good close look and I will you
give you a hint. This has to do with the
| | 03:25 | Primary, Navigation links up here.
We will change it to 6 and you see it
| | 03:31 | changes the padding around those links.
Of course we did not change it into
| | 03:35 | anything more attractive so we will
change it back. Finally I should mention
| | 03:39 | something at the very bottom of the
CSS sheet. We will scroll down. We have
| | 03:43 | these Module specific styles. That is
because Drupal comes with several modules
| | 03:47 | built-in, as you know for example the
Feed aggregator and the Blog module.
| | 03:52 | As a result everything theme
designer can count on them being there and
| | 03:55 | sometimes they will add there own
styles so that those modules will match the
| | 03:58 | rest of the site. However they can be
over written as you can see with these
| | 04:02 | other modules specific style
sheets such as poll and aggregator.css.
| | 04:07 | Let us say that we have made some of
these changes and in fact let us go back
| | 04:11 | to our style CSS scroll all the way up
to the top and let us actually change
| | 04:15 | our font size, let us say that we do
not like it being quite that big through
| | 04:19 | out the entire site. I am going to
change the font size from 76 to let us say
| | 04:25 | 70. It is a sudden change, but it
allows you to put more content on your site.
| | 04:29 | Now I am going to save that out. Now
here is something important. Do not save
| | 04:34 | it to the same place as the original
style.css file unless you have already
| | 04:38 | backed it up. If you do so of course
you are going to loose your original
| | 04:42 | backup and I recommend that you backup
your CSS file. So I am going to save it
| | 04:45 | to the desktop in this case and then I
am going to apply it by dragging it by
| | 04:49 | into my Drupal folder. Click on the
Finder, hide everything else. If you are
| | 04:53 | working with a downloaded theme you
probably put it inside of sites and then
| | 04:57 | either in all or default.
| | 05:00 | I tend to put them in default and
themes right here. In this case we are
| | 05:04 | working with a theme that came by
default with Drupal, so let us go back to our
| | 05:07 | Drupal folder and just go into themes
folder. Remember the ones by default are
| | 05:12 | at the top-level themes folder. The
ones you download should go into a
| | 05:16 | subdirectory of your sites folder. Open
up themes, open up our theme, which is
| | 05:20 | bluemarine. I am going to make a
backup remember. Call this one style-BACKUP.
| | 05:24 | Then I will just drag this new style
CSS in and let us see if that font size
| | 05:33 | change occurred.
| | 05:34 | We are going to switch back to Firefox,
we can this up if we like so we can see
| | 05:39 | the whole page and now reload by
clicking on the reload icon here. As we can
| | 05:43 | see our font change took, but we are
going to revert it back by simply going
| | 05:47 | back to the Finder, Hide Others
throwing away our new style sheet either by
| | 05:51 | dragging it to the Trash in the
Mac or right click delete in the PC.
| | 05:56 | Change this back to style.css then go
back to Firefox, reload one more time and
| | 06:03 | we are back to normal. We have only
touched a little bit of CSS. If you want to
| | 06:07 | learn more Lynda.com offers much more
information on both its technical side
| | 06:11 | and on using CSS for design. Visit the
Lynda.com site for several courses to
| | 06:16 | continue your CSS studies. Besides
the Wed Developer plug-in there are many
| | 06:21 | other ways to work on CSS files.
| | 06:23 | Once you are good enough at
understanding them you can use a plain text editor
| | 06:27 | or you can edit them graphically in
a general web developing tool such a
| | 06:30 | Dreamweaver or Adobe GoLive or you can
download a specialized tool such as Coda
| | 06:35 | for the Mac. However you do it,
until you become you CSS expert remember to
| | 06:40 | respect its power and complexity. Keep
your changes small and controlled and
| | 06:44 | always make a backup first.
| | Collapse this transcript |
|
|
12. Expanding Your Site's Capabilities with ModulesFinding modules| 00:00 | If you have been impressed by Drupal's
default installation, hold on to your
| | 00:04 | seats because there is a lot more
available for Drupal to extensions that are
| | 00:07 | known as Modules. The central
repository for all Drupal Modules is, like some
| | 00:12 | many other things for Drupal, at
drupal.org. Once on the site click on the
| | 00:18 | Download tab and then on Modules.
Hundreds of Modules are available here all for free.
| | 00:23 | Let us take at some of the ways they
extend Drupal's functionality. When you
| | 00:28 | first arrive at the Modules page you
will notice a list of categories for the
| | 00:32 | different modules. The number next
to them tells you how many of that
| | 00:36 | particular category there are. However
I should mention that these are for all
| | 00:40 | versions of Drupal and a module that is
written for version four or five would
| | 00:43 | not work for version six.
| | 00:45 | However, most modules that are built
for 6.1 will work for 6.2 and continuing
| | 00:50 | on up. I would be sure to filter by
Drupal core compatibility however. You can
| | 00:55 | do that up here, but first you must
log on. I am going to do using an account
| | 01:00 | we created. I suggest that you do the
same by creating an account. You can do
| | 01:04 | so by clicking on this Create New
Account link, but for right now we are going
| | 01:08 | to log in ourselves.
| | 01:13 | Now we are logged in and as you can see
we can filter by Core compatibility. I
| | 01:17 | go down to 6.x and say Filter. You will
notice the number of modules available
| | 01:22 | has changed. I should mention that some
modules fit in more then one category.
| | 01:27 | For example, a module that protect
against user abuse, might be find in both
| | 01:31 | Security and User management. You can
find a specific module by going up to the
| | 01:35 | search box bar and searching for it.
| | 01:37 | Let us look for bitcache, which I
happen to know is the name of one of the
| | 01:40 | modules. And there it is however we
should mention that sometimes drupal.org
| | 01:46 | will turn off the search box when the
load is too high. So we will go instead
| | 01:50 | to Google search for bitcache and if
you want to search just on the Drupal site
| | 01:56 | you can do site: drupal.org.
| | 01:59 | And there it is. If you want to be
even more specific you can say, search for
| | 02:03 | drupal.org/project. That will leave
out some of the pages that might be for
| | 02:10 | example in documentation. But let us go
back to the drupal.org page and take a
| | 02:14 | look at some of those
categories. To get there again we go to
| | 02:17 | drupal.org/project/modules. Most of
these categories are self explanatory. I am
| | 02:26 | going to talk about some that are not
quite as clear to the first time user.
| | 02:29 | The first one is CCK. This refers to
something called the Content Construction
| | 02:34 | Kit which lets you create your own
Content types with special type of fields
| | 02:39 | for example, for location or time or
date. We will be talking about that more
| | 02:43 | in a separate video. A second category
whose name is not completely obvious is
| | 02:48 | Organic Groups. Organic Groups allow
members to create their own online clubs.
| | 02:53 | For example individual members of a
site about cars might set up affinity
| | 02:57 | groups for owners of
electric vehicles or thunderbirds.
| | 03:00 | This is a common feature of such
popular non-Drupal sites such as Facebook,
| | 03:05 | Myspace, triab.net and Live Journal.
Another category that is not completely
| | 03:11 | obvious to the first time user is paging.
Modules in the paging category change
| | 03:16 | the way the pages are displayed and
many of the modules in here are also in the
| | 03:20 | content display category. The RDF
category stands for Resource Description
| | 03:26 | Framework. This is a very geeky
system for data sharing and you almost
| | 03:30 | certainly would not be using these
modules unless you are already an Advanced
| | 03:34 | Developer or Data Manager.
| | 03:36 | Finally there is a category called Views.
Views offer different ways to display
| | 03:41 | information from multiple nodes in an
organized way. We will be showing you how
| | 03:46 | to use views in another video. Let me
show you an example of what a module can
| | 03:50 | do. For this I am going to go to my
own web site, savemyhomebook.com and from
| | 04:00 | there I am going to go to Events.
| | 04:03 | On this site a keep a calendar of
upcoming events and as you scroll down you
| | 04:07 | can see that I have a speaking
engagement on the 23rd. When you click on that
| | 04:11 | it goes to a note that describes more
about that speaking engagement. This
| | 04:14 | entire calendar was created using a
module. The module itself is called
| | 04:19 | calendar. Let us go there now. We will
go back to our Modules page and find it
| | 04:25 | in Content display. As we scroll
down on this page, there it is.
| | 04:34 | We can find out more about the module
by clicking on Find Out More or of course
| | 04:38 | we could download it directly from that
download link. I do recommend that you
| | 04:42 | read up on the module before you
download and install it because unlike themes
| | 04:46 | modules can actually cause some real
problems with your site. Further some
| | 04:50 | modules are not completely obvious
about how they work, that is they do not
| | 04:54 | have a clear interface within Drupal.
| | 04:56 | You may have to download other modules
to expose what that first module does.
| | 05:01 | So reading up is a good idea.
Finally for any of these modules you should
| | 05:05 | scroll down and make sure that the
compatibility is what you want, what you are
| | 05:09 | looking for is an up to date module
that is not still in development that is it
| | 05:12 | is been released it is been tested by
the people who have programmed it and by
| | 05:16 | it user.
| | 05:16 | We will scroll down on this one and
make sure and this one in fact is in beta.
| | 05:23 | There are few different levels there
is beta, alpha, RC which stands for
| | 05:28 | Release Candidate and DEV which
stands for Development. As a guide the
| | 05:32 | Developers will put a check mark if
they feel that it is ready for prime time
| | 05:36 | that is if it is safe to download and
install. If they are not really sure they
| | 05:40 | might put one of these warning
triangles and if they feel that this it is not
| | 05:43 | supported any more or might be
dangerous to use they will put it in red. So be
| | 05:47 | careful of those.
| | 05:49 | When you are looking at modules you
might be overwhelmed by the selection that
| | 05:52 | you have. So, which one should you use
? Well there are two ways to find out.
| | 05:56 | First you can look for modules only
when you have a specific problem that you
| | 06:00 | want to solve. Second you could
consider the most popular out there and those
| | 06:05 | that are recommended by the other
people and for that I recommend the web site
| | 06:08 | drupalmodules.com. There you will find
a directory of top favorites that is the
| | 06:13 | once that people have said I like
this the most and those that have been
| | 06:17 | downloaded the most.
| | 06:18 | But for now let us go back to our web
site. Once you start dipping in to the
| | 06:24 | pool of modules you will come to see
Drupal's default installation as being
| | 06:28 | only a very bare bones plot of
lands on which to build your castle.
| | 06:32 | I encourage you to experiment with
modules but, and I have to emphasis this, only
| | 06:37 | on a test site. Some modules can
conflict which each other and in any case
| | 06:41 | adding lots of unnecessary modules
will complicate your site both from the
| | 06:45 | users prospective and from yours. But
on your test site be bold and make backups.
| | Collapse this transcript |
| Unpacking and installing modules| 00:00 | While modules vary tremendously in function,
dependencies and configuration options,
| | 00:05 | they all get on to your server in
the same way. You need to download
| | 00:09 | them to a modules folder and your
Drupal installation on your server, which
| | 00:12 | means you will need right level access
to that folder. If you do not have it
| | 00:16 | already talk to your system
administrative before proceeding.
| | 00:20 | First let's go and take a look at
some of the different stages of modules
| | 00:23 | because we need to get those only that
are secure and reliable. At the bottom
| | 00:29 | of each module description you will
notice a list of releases this one has only
| | 00:33 | one, but you will also notice it has
a suffix. That suffix will either be
| | 00:37 | alpha, beta, def or RC.
| | 00:41 | This one, for, example is alpha. Alpha
is the stage before beta, and an alpha
| | 00:45 | release means that it might be okay
but we are really not sure about enough
| | 00:49 | about it to release it to the general
public even for testing. So, be careful
| | 00:53 | with alpha releases. The second kind
is beta, beta stage means that it is not
| | 00:58 | quit ready for release, but the
developers believe that it is secure enough to
| | 01:02 | be tested by the general public.
| | 01:04 | The third stage is known as dev. In
this case the version is at dev. That means
| | 01:10 | that it is still in its development and
they do not recommend that you use on a
| | 01:14 | production site. In fact it's only
intended for the developers to use so that
| | 01:18 | they can fix problems. Be extremely careful
when using modules that are this stage.
| | 01:25 | Then we have RC. That means release
candidate. It is the last stage before
| | 01:30 | something becomes stable and release to
the public as though it were a product.
| | 01:34 | So the stage is go dev, alpha, beta,
RC and then the final. Now that was gone
| | 01:41 | through that, let's look at its
specific Drupal module. To go to it we go to
| | 01:45 | Durpal.org of course and
then to Download Modules.
| | 01:52 | We have decided to protect user by
preventing online robots from easily
| | 01:56 | collecting their email address. So even
if a user types in tom@example.com, it
| | 02:01 | will appear on the site and in an
obfuscated way. The module we want to add is
| | 02:05 | called Spamspan. I'm going to just
find it quickly by searching here and we
| | 02:12 | find everywhere on the site where the
words Spamspan appears. I am going to
| | 02:15 | click on one and eventually I found the module.
| | 02:18 | I happen to know that this one is also
in the security category. Once you get
| | 02:22 | to a modules home page you will notice
several things. First there will be a
| | 02:25 | description of the module appear.
The second thing is releases, as we
| | 02:29 | described, and as you scroll down
further you see quite a few resources,
| | 02:34 | documentation, the license that
governs the module and sometimes you can even
| | 02:38 | try out a demonstration. Clicking on
that will go to an outside web site
| | 02:42 | where the module has been installed
and you see actually how it works.
| | 02:45 | I do recommend looking throughout the
page, especially if you have any problems
| | 02:49 | with the module. Very often you will find
information that will help you through it.
| | 02:52 | Once you have read all of that all
you need to do is download the module.
| | 02:56 | You go up to the download link that is
next to the version that you want, in our
| | 03:00 | case the one for 6.X. Click on
Download. Usually does not take very long,
| | 03:04 | they are very small files, and then go
to where ever you downloaded the file.
| | 03:08 | In our case it is on the desktop.
| | 03:10 | I will click on the Finder and say
Hide Others and there is our file. I will
| | 03:14 | double click on it and it expands into
a folder. The next question is where do
| | 03:19 | we put this folder? The obvious place
is modules but that is not actually the
| | 03:24 | best place to put third party modules.
That location is reserved for modules
| | 03:29 | that were installed by Drupal itself.
If you put them in there, then they won't
| | 03:33 | be undated when Drupal does its update process.
| | 03:36 | Instead, as with themes, you go into
sites and then put it in either All, if
| | 03:41 | you want it to be available for all
sites on a multi site installation, or for
| | 03:45 | our purposes we only need to put it
into default. We will open that up and we
| | 03:49 | will put it into a folder called
modules. I should mention that you need to
| | 03:53 | call this folder modules with a lower
case M, just as you needed to called the
| | 03:57 | themes, with the lower case T.
There is one problem though.
| | 04:01 | We cannot create that module folder
until we make this directory writable. It's
| | 04:06 | not at the moment because Drupal has
locked it in order to protect the settings
| | 04:10 | file. So, we are going to go up one
level. Again, see we can see the default
| | 04:14 | folder there, we will select it and
then we will get info on that. On the Mac
| | 04:18 | you go up to File > Get Info. On the
PC you would right-click and select
| | 04:23 | Properties.
| | 04:25 | You may have to enter your password in
order to unlock that folder. We will do
| | 04:29 | that here and then change Read Only
back to Read and Write. We are going to
| | 04:34 | change that back to Read Only before we
are done. So, I am going to leave this
| | 04:37 | window as a reminder. Now we go back
into default. I will create a new folder
| | 04:44 | and call it module and there
we will put out Spamspan module.
| | 04:51 | Very good. Now again I am going to go
back and change that to Read Only and
| | 04:56 | close it. Now, we go back to our Drupal
interface, I will hit Command+Tab to go
| | 05:01 | back to our browser. We can close our
Download window, close the other windows
| | 05:06 | we have open and switch to our site.
As with any other module you would go to
| | 05:10 | Administer and Modules and scroll down.
| | 05:15 | You may have noticed that there are
these groups. This one is called Core Optional.
| | 05:20 | This group of modules when you first
install Drupal but they are necessary for
| | 05:24 | installation. You can close this group
if you like by clicking on the link.
| | 05:29 | Core Required those that were
installed by Drupal and you can not turn off
| | 05:33 | because otherwise Drupal won't run. We
will close that and we have our Spamspan
| | 05:37 | right here. We still more information
and this is very interesting. It tell you
| | 05:41 | what it depends on, what other
modules have to installed.
| | 05:45 | Sometimes you will download a module and it
will say, depends on such and such and it
| | 05:49 | will say missing or disabled. You
will have to obviously get that module or
| | 05:53 | turn it on before this one will work.
In this case we do not have to turn down
| | 05:57 | any thing else. So, we will just click
Enabled, Save Configuration and it is
| | 06:02 | been turned on. The next step of course
is to configure which we'll do by going
| | 06:06 | to Administer and By Module, but we
will get into that in another video.
| | 06:11 | When you see all that modules can do
you will have to resist the temptation to
| | 06:15 | just grab a bunch and enable them all.
I sure know I do. But I recommend you
| | 06:19 | download, install and then thoroughly
test only one at a time before going on
| | 06:24 | to another one. That will keep
your site safe, stable, and secure.
| | Collapse this transcript |
| Configuring modules| 00:00 | There is a wide variety of modules
available to extend Drupal's functionality
| | 00:04 | and they all have different
configuration process. Some have no obvious
| | 00:09 | interface within Drupal administration
interface while others require extensive
| | 00:13 | tweaking both in admin Interface and on
the server. We will show you a typical
| | 00:17 | configuration process using a module we
already downloaded and installed called
| | 00:22 | Spamspan. If you have not installed it
and would like to follow along your own
| | 00:26 | Drupal installation
download it now from Drupal.org.
| | 00:30 | Just to give you an idea of the
different types of configuration we are going
| | 00:34 | to look very quickly at some other
modules and describe how they are installed.
| | 00:38 | The first one is called Guest Book,
this one is as simple as it comes you put
| | 00:43 | it in to your modules folder and it
has a single page where you can configure
| | 00:47 | everything that you need. Second module
is called Weather, this one is similar
| | 00:52 | to Guest Book and that you just add
the permissions and then change one page,
| | 00:56 | but here is the thing once you have
done that you might wonder well, where is
| | 00:59 | evidence that the module is installed.
| | 01:01 | What it actually does is create a block
that you then have to put on your page
| | 01:05 | in one of your page's zones. The third
module is the token module and this one
| | 01:10 | is widely used, however it has not
interface of its own other modules rely on
| | 01:15 | the token module in fact we will force
you to download it before you can use
| | 01:19 | those other modules.
| | 01:20 | However it has no permission of its
own and no interface. Finally we come to
| | 01:26 | Spamspan which is comparatively
simple but it does have its own quirks that
| | 01:30 | require reading the documentation. We
are going to walk through this one. To
| | 01:35 | configure this we go back to our site
and click Administer Modules. Make sure
| | 01:42 | that is turned On we can do so by
closing up this to hide all of the core
| | 01:46 | modules and there we see our Spamspan
module and we have already turned it on.
| | 01:51 | We do not have to turn it on again but
if you have not you should do so here
| | 01:55 | Then we go up to administer again and
we can look through here for the Spamspan
| | 01:59 | module. I am going to search for it on
this page by hitting Command F on the
| | 02:03 | Mac or Ctrl+F on the PC. I search for
spam, find nothing. Let's go into By
| | 02:09 | module and scroll down. We do not see
it there either. We better go back and
| | 02:19 | read the documentation, so switch back
to SpamSpan page and as we scroll down
| | 02:25 | we see Read documentation.
| | 02:26 | Let us take a look. A quick read of
this shows okay, the first two steps are
| | 02:31 | the things we have already done.
Download it, and put it in the correct place.
| | 02:35 | But here is something you have to
actually configure input formats to enable
| | 02:40 | the filter, so after it installs you
do not administer it directly but rather
| | 02:43 | by administering input formats.
| | 02:45 | Let us switch back and try that. So
we will go back to top of the page,
| | 02:52 | Administer, scroll down to Input,
right there Input Formats and then what the
| | 03:01 | documentation said was to enable it in
which ever filters you want. I am going
| | 03:06 | to put it into Filtered HTML by
clicking Configure as the instructions told me.
| | 03:10 | As I scroll down I see this new check
box Hide e-mail addresses. This is the
| | 03:18 | thing that SpamSpan actually added,
but you would not have known that if you
| | 03:22 | did not read the documentation.
| | 03:23 | I will do that now and save
configuration. In addition to the four types of
| | 03:29 | configuration we described here there
are also modules that require signing up
| | 03:33 | for outside services, modules that
require several downloads and modules that
| | 03:38 | require substantial tweaking on the
server itself completely out side of
| | 03:41 | Drupal's Administrative interface. As
always you will gain the info you need
| | 03:45 | and confidence by reading
the modules documentation.
| | Collapse this transcript |
| Implementing complex modules| 00:00 | This video will give you an
introduction on how to install some of Drupal's
| | 00:03 | more complex modules. These generally
require installation of several modules
| | 00:08 | and some require considerable
additional tweaking. We won't discuss their
| | 00:12 | configuration at lent but we will
instead give you an overview of such modules
| | 00:16 | just to give you peak into some of the
amazing things Drupal can do, if you are
| | 00:20 | willing to spend sometime learning
about these modules and the ecosystems that
| | 00:24 | have grown up around them.
| | 00:25 | The first module we will be showing
is called Google Analytics. The Google
| | 00:29 | Analytics service allows you to keep
track of who is visiting your website and
| | 00:33 | what page is they are going to before
and after they reach a particular page,
| | 00:37 | it has many features that are
extremely useful for web administrators
| | 00:40 | especially those who want market
their sites and improve the efficiency and
| | 00:44 | effectiveness of their sites.
| | 00:45 | We have already downloaded this so
we are going to install it. So we will
| | 00:49 | expand it and drop it into our folder,
then we go back to our Administrative
| | 00:54 | Interface. To administer we will first
of course go to Administer, Modules and
| | 01:00 | turn it On and then click Save
Configuration. Now we will go up to administer,
| | 01:08 | but what is this we see in error. Let
us take look at the status report as it
| | 01:12 | suggests.
| | 01:14 | We go down and notice that it says
about the Google Analytics module it hasn't
| | 01:17 | been configured yet. This is unusual
for a module, usually if it hasn't been
| | 01:21 | configured it does not tell you it
just sits there and does not add any
| | 01:24 | additional functionality, but this one
is decided its important enough that you
| | 01:27 | turn it On. So let us go to the setting
page and here it shows that it requires
| | 01:33 | us to enter an account number.
| | 01:35 | For this particular module you must
already be signed up for the Google
| | 01:38 | Analytics service, which is at google.
com/analytics, before you can use this
| | 01:43 | module. We wont take you to the whole
configuration instead we are just going
| | 01:47 | to go back to administer, modules and
turn it Off. But of course if you wanted
| | 01:55 | to use it you would go through the
complete process of turning it On and going
| | 01:58 | to Google Analytics and entering your code.
| | 02:03 | The second module that we are going to
show is called Pathauto. Pathauto will
| | 02:08 | automatically add user friendly URLs to
any nodes that you create. It will look
| | 02:12 | to through content of the node and try
to figure out what it is about and then
| | 02:16 | it will change the node's name to
whatever it decides. We have al ready
| | 02:20 | downloaded this so we are going to
unpack it and install it and then of course
| | 02:28 | go back to our administrative interface.
| | 02:30 | Refresh our module list or go to
Administer and modules, scroll down to the
| | 02:37 | bottom or close up the core ones at
the top so that we can see what is at the
| | 02:40 | bottom and there it is Pathauto, but we
can not check it to turn it on and why
| | 02:45 | is that? If we look at its
dependencies down here, we will see it depends on
| | 02:49 | path, okay that is enable that is
part of the core, but it also depends on
| | 02:52 | token and we never downloaded that,
okay we will have to go back to the
| | 02:56 | drupal.org web site downloaded and turn it On.
| | 03:00 | So, here on drupal.org we go and find
the token project downloaded, un pack it
| | 03:05 | by double clicking and install that one,
of course we now have to turn it On so
| | 03:10 | we go back to our web site and then
have to enable it. So, we will go back up
| | 03:14 | to administer, modules, close up the
course so we can see what the bottom of
| | 03:21 | the screen and there is token. Now,
this is interesting even though we
| | 03:25 | installed one module it adds two check boxes.
| | 03:28 | I am going to check both of them for
now but of course you would read all of
| | 03:31 | the documentation to understand what
the different check box is mean, click on
| | 03:36 | Save Configuration. Now, let us take
another look and see if we can turn on
| | 03:40 | Pathauto, close up the core appears,
scroll down and now we can check Pathauto,
| | 03:47 | scroll down to the bottom
and save the configuration.
| | 03:50 | Finally we have the Ezmlm module. This
is a module that requires tweaking on
| | 03:55 | the server completely out side of the
Drupal interface, further it requires
| | 03:59 | installation of an additional program,
we are not going to go through the whole
| | 04:03 | process because as I say it is quite complex.
| | 04:06 | Finally there is one more thing that we
need to do we been playing around with
| | 04:10 | a lot modules in this video and we
should turn them Off and un install them, to
| | 04:14 | do so go to your module's page by of
course clicking on administer and them
| | 04:19 | modules, scroll down or close the core
box at the top so that you can see what
| | 04:25 | is at the bottom and then just turn
them Off, but you will notice that you can
| | 04:29 | not turn Off the tokens one until
you have turned Off Pathauto, because
| | 04:33 | Pathauto relies on tokens.
| | 04:35 | So, we will turn these off say save
configuration and then turn off SpamSpan if
| | 04:41 | we had left it on. And token, click
Save Configuration again and once all of
| | 04:49 | those are turned off you can go back
to your Drupal installation folder and
| | 04:53 | throw away all of the folders that
contain the modules that is in your module
| | 04:57 | folder.
| | 04:57 | We are getting in to some pretty deep
territory with these complex modules but
| | 05:03 | believe me some are even more complex,
for example CiviCRM is a complete system
| | 05:09 | for non-profit and advocacy groups.
Digg is a Drupal based invitation of the
| | 05:13 | famous digg.com site and organic groups
allows member to create their own clubs
| | 05:18 | and all of these require quite a lot
of configuration. But do not be afraid,
| | 05:22 | the bases that you have got in here
will provide you a firm base to implement
| | 05:26 | any such system.
| | Collapse this transcript |
|
|
13. Identifying Must-Have ModulesEnsuring automated updates with poormanscron| 00:01 | Drupal requires the server to do
certain things periodically, for example send
| | 00:05 | out mail, poll other sites for RSS
feeds and so forth. Part of the installation
| | 00:09 | process solves this problem with the
program cron on Drupal's host server, but
| | 00:14 | what if you do not have access to the
server? Fortunately there is a solution
| | 00:18 | in the form of a module called
Poormanscron. As with all modules you will need
| | 00:22 | right access to the
modules folder on the server.
| | 00:25 | Here we are at the
Poormanscron webpage, which is
| | 00:28 | Drupal.org/project/poormanscron. We
have already downloaded and install this
| | 00:33 | module so we will go straight to our
administrative page to turn it On. And
| | 00:41 | just check the check box here and save
configuration, from here we can go to
| | 00:45 | the Administer page and if we do a
search for Poor we will see there it is. We
| | 00:51 | will click on that to configure it.
| | 00:54 | As with the cron program you can
choose how frequently the cron program runs,
| | 00:58 | however you do not get the opportunity
to choose at which minute it runs as do
| | 01:02 | with cron tabs. We will just say we
wanted to run every half hour. To Retry
| | 01:07 | interval is in case the cron program
is not able to run. It will keep trying
| | 01:12 | after 10 minutes has passed if you
leave it in the Default. You have a choice
| | 01:16 | of whether to log successful cron
runs and to log Poormanscron progress.
| | 01:21 | I recommend that you leave these in
their default settings, log in successful
| | 01:25 | cron runs means a little show up on
the reports page, where as log in the
| | 01:28 | progress really adds a lot of
information that you do not need to that page. We
| | 01:32 | will click on Save Configuration and
we are done, the configuration options
| | 01:36 | have been saved.
| | 01:37 | There is one other thing that you
should do though which is to turn off the
| | 01:41 | cron tab that you turned On earlier if
you have done so. On the Mac what you
| | 01:45 | would do is go back to the finder hide
everything, you will find a program in
| | 01:51 | the applications folder. Down at the
bottom in utilities called Terminal that
| | 01:59 | lets you enter the command line
interface. If you are running on a Windows
| | 02:02 | machine you simply say run and then cmd,
which will bring up your command line interface.
| | 02:07 | For Windows users, the task scheduler
function is a good replacement for cron.
| | 02:12 | A good explanation of how to use this
function can be found at the Drupal.org
| | 02:16 | website. Follow the URL below for more
information. We are going to edit this
| | 02:21 | cron tab again. To do so you type crontab
and then -e for edit. And there is the line
| | 02:27 | that we entered earlier. If you
are using a Macintosh in its default
| | 02:31 | configuration you will be
using an editor called VI.
| | 02:34 | The command in VI to delete that line
is Shift+D, and then the command to get
| | 02:39 | out of there is :WQ for write and quit.
When you do this it tells you that it
| | 02:47 | installed a new crontab and you are all set.
| | 02:49 | Poormanscron is one of the simplest
modules out there but it also essential for
| | 02:54 | anyone who does not have access to a
cron application and who does not wants to
| | 02:58 | use an outside cron service such as
webcron.org. In fact I use it on all my
| | 03:03 | sites, even though I do have access
to a cron application, because it is so
| | 03:07 | much easier to manage then running crontabs.
| | Collapse this transcript |
| Defining custom content types with CCK| 00:00 | Drupal's default installation comes
with only a few basic content types that,
| | 00:05 | truth be told, do not differ much one
from the other. A Blog post is very much
| | 00:09 | like a story which in turn is very
much like a page. The Content Construction Kit,
| | 00:14 | or CCK Module, is your gateway to
expanding content types tremendously,
| | 00:19 | incorporating not only plane text, but
also email address, dates, durations and so on.
| | 00:25 | We have already downloaded and installed
this module. If you need help doing so,
| | 00:29 | see the video in this series
entitled 'Unpacking and Installing Modules'.
| | 00:34 | CCK is indispensable for anyone who
wants to build a specialized Drupal site.
| | 00:39 | For example, a catalog or a resource
directory, but it takes a little getting
| | 00:44 | used to. The first thing that we are
going to do is to create a new content
| | 00:48 | type. That is the one that we are
going to be playing with, when we use CCK.
| | 00:52 | We will go to Administer, Content types
and Add Content type. The Content type
| | 00:58 | will be called Property Listing. The
Type will be property_listing. Remember
| | 01:05 | the type is machine readable, so you
have to limit exactly what characters go
| | 01:09 | into it and the description will be,
Underwater properties offered for sale.
| | 01:16 | Scrolling down further we click on
the Submission form settings, change the
| | 01:21 | Title field label to Headline and
the Body to Description of property.
| | 01:28 | We will also change the workflow
settings, so that a new revision is created
| | 01:32 | each time and note that it is promoted
to front page, so everything we create
| | 01:35 | as property_type will show up on the
front page. And under Comment Settings we
| | 01:39 | will disable them, so that people
cannot comment on property listings.
| | 01:43 | Scroll down to the bottom and Save
content types. Now we are ready to start
| | 01:48 | adding CCK fields, but first let us
take a look at exactly what CCK does. We
| | 01:53 | will go into Administer and Modules. We
have installed the Modules, but we have
| | 01:57 | not turned them on. Let us see what
they look like. At the top you see this
| | 02:01 | group CCK. Just by installing that one
module we have all of these different
| | 02:07 | parts that we can turn on or off.
| | 02:09 | The only one that is necessary is
Content. We are going to turn on only that
| | 02:13 | one, then scroll down to the bottom of
the page and Save Configuration. We are
| | 02:20 | going to edit the Content type
called Property listing. To do so go to
| | 02:23 | Administer and then to Content types
and down to Property listing, but you will
| | 02:28 | see that there are two new fields here
called Add Field and Manage Fields. We
| | 02:32 | want to add a field, so
we will click on add field.
| | 02:36 | It did not work; the reason is that
although we added the CCK Module and the
| | 02:40 | content part we have no specific CCK
types that we can add. So we will go back
| | 02:45 | to Administer and Modules and in our
case, we are just going to add two more,
| | 02:50 | Number and Text. The other options in
the CCK area define either CCK types such
| | 02:57 | as Number or Text or they define
certain things like Permissions or how CCK
| | 03:02 | fields can be grouped on the page.
| | 03:04 | You can read more about these in the
documentation for CCK. In addition you can
| | 03:08 | download other CCK types at drupal.org
in the Modules download area. But for
| | 03:13 | now, we will just go down to the bottom
of the page and save our configuration.
| | 03:19 | Now we will go back to Administer,
Content types and Property listing and we
| | 03:24 | will try adding a field. Now we can
add a field. The first field we are going
| | 03:29 | to add is bedroom since obviously if
you have a property listing you want to
| | 03:33 | know how many bedrooms it has.
| | 03:34 | We will call it field bedrooms; the
label will be Number of bedrooms. Here we
| | 03:41 | have a choice, what sort of field we
want it to be? The reason we have these
| | 03:45 | four choices because we turned on the
Number and Text CCK types. The first
| | 03:50 | three obviously are numbers. Decimal
means with a decimal point in it, like
| | 03:54 | 3.5. Float means a floating-point
number, which is used in computing. Integer
| | 03:59 | is a whole number; 3, 6 negative 5
and Text obviously would be a plain text
| | 04:04 | field.
| | 04:05 | Since you can only have a whole bedroom,
we will change it to Integer and then
| | 04:08 | click Continue. Depending on what we
selected in Field type our next options
| | 04:13 | are going to vary. Under Widget type
we only have option of Text field. Again
| | 04:18 | as you add more CCK types you may have
other choices. We click on Continue and
| | 04:24 | have several options. The first is Help
text. We can say to people, "Please put
| | 04:29 | the number of bedrooms in this area."
We do not really have to do that because
| | 04:33 | it should be clear, number of
bedrooms is the number of bedrooms.
| | 04:36 | You can also enter a Default value. For
example, let us say that you live in a
| | 04:40 | condo development in which everything
has to two bedrooms except for five or
| | 04:44 | six properties. Then you might have a
default value of two and then let people
| | 04:49 | change it to something else when that
exceptional case occurs. We will click on
| | 04:53 | that and you can see, you can enter
your default there. You can also enter PHP
| | 04:57 | code depending on circumstances that
you can interact with in a PHP program
| | 05:02 | that is well beyond the
subject of this course though.
| | 05:05 | Going down you can require that field
to be entered. If it is not checked then
| | 05:10 | people can just leave it blank. We are
going to require it. You can indicate a
| | 05:13 | Number of values, so people have to
enter five different types of bedroom,
| | 05:17 | obviously that does not make sense
here, so we will not include it. You can
| | 05:21 | have a Minimum and a Maximum and a
Prefix. We will show you what the Prefix
| | 05:25 | means in another field that is coming up.
| | 05:27 | Along with the Prefix, you can have a
Suffix and finally you can limit the
| | 05:31 | values to a list that you define. For
example, let us say, that you never deal
| | 05:36 | with properties of more than five
bedrooms, but you also never deal with
| | 05:40 | properties of three bedrooms. You
could limit it to one, two, four and five
| | 05:44 | bedrooms by typing in 1, enter, 2, enter,
4, enter, 5; one per each line. Again
| | 05:51 | you can enter PHP code for that as well.
We are just going to save the field as
| | 05:55 | it is now.
| | 05:56 | Now we see a list of all of the fields
and something interesting is here. We
| | 06:00 | see the Headline and Description of
property. Those were built-in to the
| | 06:04 | Property listing even before we
installed CCK. We change the names that were
| | 06:08 | titled in body but CCK exposes the
fields that are already built into Drupal.
| | 06:14 | Similarly Menu Settings is one of
the built in fields that CCK exposes.
| | 06:19 | Continuing on we are going to add a few
more fields by clicking Add Field. This
| | 06:24 | one is going to be bathrooms --
number of bathrooms. For Field type, we are
| | 06:30 | going to leave it as decimal because
you can actually have half a bathroom, if
| | 06:34 | there is a toilet and sink and no
shower for example. We click on Continue and
| | 06:39 | again we have this Widget type which
at the moment the only choice is Text
| | 06:42 | field, so we will just click Continue.
| | 06:43 | We will scroll through here and for this,
we do need a Help text to explain to
| | 06:48 | people exactly what half a bathroom is.
So we will type in, use decimals to
| | 06:55 | show partial bathrooms, 0.5=toilet
and sink but not bathing. 0.75=sink and
| | 07:08 | bathing facilities but no toilet. Again
we do not have a default value; we are
| | 07:16 | going to require this field. We only
want one field to be entered. No minimum
| | 07:21 | or maximum.
| | 07:22 | The Precision popup comes into play,
if you are dealing with math mostly. The
| | 07:26 | minimum precision is 10, which is more
than enough for most purposes. We only
| | 07:31 | need three places of precision since we
can only have 1 or 1.5 or 1.25, we will
| | 07:37 | never have 1.333. In any case 10 is
more then enough. For Scale we know we will
| | 07:42 | never need more then 2 to the right of
the decimal, so we can leave it at 2.
| | 07:46 | You have a choice of what sort of
decimal marker you want. This one is
| | 07:50 | depending on what country you are in.
Some places in the world use a comma or a
| | 07:54 | space instead of a decimal point. Since
we are doing this site for US audience
| | 07:58 | we use the decimal point. Again
Prefix and Suffix, Allowed values we showed
| | 08:02 | you. Click on Save filed settings.
| | 08:04 | All right, we are getting there. The
third field we are going to add is going
| | 08:09 | to be Price. We will just call it price,
the Label is Price and the field type
| | 08:15 | is Integer. We are not going to let
people charge pennies on there houses.
| | 08:19 | Click on Continue, again Widget type is
Text field, Continue. We do not need a
| | 08:24 | Help text. We are going to require
this and we are going to require a minimum
| | 08:28 | of 1, so that people can say this
property is whatever you decide to pay me. We
| | 08:33 | are going to make them name a price.
For Prefix, we are going to put in the $
| | 08:37 | sign, so that every time somebody
enters the number it will come out with a $
| | 08:41 | sign ahead of it.
| | 08:43 | Skip Allowed Values and Save field
settings. There is just one more field we
| | 08:47 | have to add and that is the Address
field. Go up to Add field, we will call it
| | 08:52 | address. Under Label we will call it
Address and for Field type, we will say
| | 08:57 | Text and Continue. Now this Widget we
have multiple selection for the first
| | 09:01 | time. We can either have text field,
which is single line, or text area, which
| | 09:06 | is multiple rows. You would use the
second if you wanted to allow users to
| | 09:10 | enter an assay for example.
| | 09:12 | But one line is good enough for us and
we will click Continue. We do not need a
| | 09:16 | Help text; we do not need a Default
value. We do want to require a value. Keep
| | 09:22 | scrolling down and you will see an
additional option, Plain text or Filtered
| | 09:26 | text in which case you could say for
example, choose whether this it should
| | 09:30 | HTML or PHP or something, but we are
just going to use Plain text. Once again
| | 09:34 | we do not need to check Allowed
values and save field settings.
| | 09:37 | There, now we have our new CCK content
type. Before we start working with it, I
| | 09:43 | would like to point out a few things
and adjust it a little bit. First for each
| | 09:47 | field that you create you will notice
links at the top of this page. If you
| | 09:50 | click on anyone of them you can go back
and edit certain characteristics about
| | 09:54 | that field. There are some that you
cannot edit however, for example, the
| | 09:57 | Widget type, unless you click on
change basic information in which case you
| | 10:01 | back a little bit earlier. We are
not going to do that now though.
| | 10:04 | We are just going to go back and
click on Manage Fields which the screen we
| | 10:07 | were on before. From here as in other
places in Drupal, you can change the
| | 10:12 | order in which these appear. I think I
want to have the Headline up top, then
| | 10:17 | the price. You do that by clicking and
dragging on that little arrow icon, the
| | 10:22 | Number of Bedrooms, the Number of
Bathrooms, the Address and then the
| | 10:26 | description of property and we do not
need the Menu settings until the end and
| | 10:29 | in fact that is really just for
Administration anyway. The ordinary user would
| | 10:33 | not see that.
| | 10:34 | You will notice that this does not take,
until you click on Save, so now we do
| | 10:37 | that. Terrific we have created our
Content type. If we want to allow ordinary
| | 10:42 | users to able to enter it however,
we have to go up to Administer and
| | 10:47 | Permissions. On the Permissions page,
you have to allow authenticated users to
| | 10:52 | enter information in that Content type.
You can search that whole page or you
| | 10:56 | can just a find and do a search for the
name of the content type which in this
| | 10:59 | case is property. Property and
there it is, property_listing.
| | 11:03 | We are going to allow them to enter
their own properties by clicking here.
| | 11:08 | Scroll to the bottom and say Save
permissions. Now we are going to switch over
| | 11:13 | to our ordinary user fishyjoe and he
is going to add a property. We switch by
| | 11:17 | holding down Command Tab to get the
Firefox in which we have already logged in
| | 11:22 | fishyjoe. Fishyjoe can go up to
Create Content and he sees this new content
| | 11:27 | type called Property listing. He clicks
on it and he gets a form exactly as we
| | 11:32 | would expect it to appear.
| | 11:33 | Let us make a property here, Beautiful
home among the coral reefs. The price is
| | 11:42 | $35000. Well it is not very expensive;
it is full of water. Number of bedrooms
| | 11:47 | is 2, number of bathrooms is 1. The
address is 1572 Briny Deep, Sandy Beach, CA
| | 11:58 | (offshore) and for description we will
just say, a lovely little starter home,
| | 12:05 | very few barnacle.
| | 12:06 | You will notice that that Help text
that we entered earlier about number of
| | 12:11 | bathrooms shows up underneath the
field itself. So anything you enter while
| | 12:14 | defining that field will show up in
this way. We will scroll to the bottom and
| | 12:19 | say Save. There is our Property listing.
You may remember that we had this as
| | 12:24 | promoted to the front page, so we
will go back to the front page and see it
| | 12:29 | there. CCK really opens up
Drupal to all sorts of applications.
| | 12:33 | For example, I want to prototype a
dating site on Drupal and its centerpiece
| | 12:37 | was of course personal ads. The
Personal Ad Content type was created with CCK
| | 12:42 | to include all sorts of relevant
information and that allowed people who they
| | 12:47 | were and what they were looking for.
Similarly you can use CCK for fulfill
| | 12:51 | unusual needs in Drupal.
| | Collapse this transcript |
| Stopping spam using a CAPTCHA| 00:00 | Spam and site vandalism are a problem
for anyone who runs a publicly accessible
| | 00:04 | website. There are a several Drupal
Modules that give you ways of combating
| | 00:08 | such problems. We are going to
examine one of the more popular, the CAPTCHA module.
| | 00:13 | A CAPTCHA forces posters to prove
they are human and not an automated
| | 00:17 | posting box by challenging them
with human readable questions.
| | 00:21 | This module as with all modules will
change as new versions are released. As a
| | 00:26 | result the interface and features you
see here might not match what is on your
| | 00:29 | computer. We have already downloaded
and installed this module. If you need
| | 00:33 | help doing so, see the video in this series
entitled 'Unpacking and Installing Modules'.
| | 00:39 | By the way CAPTCHA is a sloppy acronym
for Completely Automated Public Touring
| | 00:44 | Test to Tell Computers and Humans Apart
and it is spelled CAPTCHA. The first we
| | 00:52 | are going to do is go to Administer
and Modules. To turn on CAPTCHA we will
| | 00:58 | click to close the CCK and all of the
other groups up here, so that we can get
| | 01:03 | to the bottom of the page quickly
and there is our CAPTCHA module.
| | 01:06 | You need to enable the main CAPTCHA
modules and then these other ones extended.
| | 01:10 | I am going to click on both of them.
You can also download additional Extenders
| | 01:15 | from the drupal.org website. Once we
are done we click on Save Configuration.
| | 01:19 | From here we would administer CAPTCHA,
by going to Administer and by doing
| | 01:24 | Command+F or Ctrl+F on PC and to find
it easily I will search for 'capt' and
| | 01:30 | there we are CAPTCHA and click on that.
| | 01:32 | We will get back to the General
settings in a little while but first we are
| | 01:37 | going to tackle Image CAPTCHA, by
clicking on Image CAPTCHA at the top of the
| | 01:41 | screen. You will note this warning at
the top, which tell us that a CAPTCHA
| | 01:46 | module works best for the TrueType
font file installed. You can get this on
| | 01:50 | your computer. On the Mac that is in
Library, Fonts from the top level and on
| | 01:55 | Windows it is in Control
Panel and then the Fonts folder.
| | 01:59 | We have already taken one and put it on
our desktop. I am going to go to that,
| | 02:03 | by going to the Finder and hiding
everything else and there is our Font file.
| | 02:08 | You put this inside the Captcha folder,
which you have installed in to Modules
| | 02:13 | and then inside image_captcha and fonts.
So we will just drag that in and then
| | 02:18 | go back to our Administrative interface.
Now when we refresh the page you will
| | 02:23 | see that this bitmap will change into
something a little bit prettier using a
| | 02:27 | font that we just installed
which incidentally was Georgia.
| | 02:30 | The reason that it is done this way is
that the makers of the CAPTCHA module
| | 02:33 | are not permitted to distribute the
fonts. You can use the ones that are
| | 02:37 | installed on your computer and it is
possible to download free TrueType fonts
| | 02:41 | from throughout the internet, but they
cannot distribute them so you need to
| | 02:44 | make this small adjustment. We are
going to reload this page. So we have taken
| | 02:49 | care of the font issue.
| | 02:50 | Now let us go through some of the
options you have. You can choose what
| | 02:55 | characters are in the code. If for
example, you decide you do not want to use
| | 02:58 | any capital letters, you can just knock
those out of here. You will notice that
| | 03:02 | some of the letters are missing that
is because a capital I looks very much
| | 03:05 | like a lower case l. I prefer to leave
the settings in here and they are given.
| | 03:10 | You can choose how long you want to
the code to be. If you want to make it
| | 03:14 | easier for humans then you would make
it two or three or four characters, if
| | 03:18 | you want to make it harder obviously
more characters. Of course the harder you
| | 03:21 | make it for people, the harder it is
also for spammers to use robots to read
| | 03:26 | your CAPTCHA.
| | 03:27 | Scrolling down further we've installed
another font, so we are going to select
| | 03:31 | it from Font. And Character Spacing
we will leave on normal. You can play
| | 03:35 | around with this once you are down,
to see which works best for you. Color
| | 03:39 | settings and Text color, we will leave
all of this alone although again, what
| | 03:43 | you will want to do is play with it to
see which one works best for you to give
| | 03:47 | you the best balance between
difficulty and ease for a person to read.
| | 03:52 | Finally you can define several types
of Distortion that will affect that
| | 03:56 | CAPTCHA. I am going to leave it as it is,
it is default just so that we can see
| | 04:00 | what that looks like and then adjust
from there. Click on Save Configuration.
| | 04:05 | Now we see an example CAPTCHA. I will
not say that is pretty good. For example
| | 04:10 | I can read that, it is + ! t # F.
| | 04:11 | Let us change a few of these settings
just to see how it affects things. We
| | 04:18 | will make the Code a little longer.
We will make the Font size larger,
| | 04:23 | Character spacing smaller. So we will
have larger and more letters, but crushed
| | 04:27 | together. This is going to make it
harder for the CAPTCHA to be read by a
| | 04:31 | computer, but also harder for people.
Continuing on, we will leave the
| | 04:35 | Background color and font color the
same although of course if make them very
| | 04:39 | similar that is going to lower
the contrast between the two.
| | 04:44 | You can also change the amount that the
text varies from letter to letter. You
| | 04:48 | might have noticed up above that the
letters do vary in color. This one is sort
| | 04:53 | of a green brown and this one is sort
of a purplish. You can change the amount
| | 04:57 | of that variation. Finally Distortion,
this one is really fun. Let us turn on
| | 05:02 | Double vision just to see what it
looks like and Smooth distortion. Leave the
| | 05:06 | Noise level at normal and Save Configuration.
| | 05:10 | There that is an example of slightly
more difficult CAPTCHA, but I can still
| | 05:14 | read it and I think this is a pretty
good setting. So we are going to go back
| | 05:18 | to Administer now and scroll down to
CAPTCHA and let us take a look at the Text
| | 05:25 | CAPTCHA by clicking on Text CAPTCHA at
the top. Text CAPTCHA actually has far
| | 05:30 | fewer options. It can generate nonsense
words or you can define a list of words
| | 05:35 | and again you can select how
long the CAPTCHA should be.
| | 05:38 | I am just going to leave it in its
default configuration, but you do not know
| | 05:42 | what these are going to look like. Do
you? At least in the Image CAPTCHA you
| | 05:45 | saw an example. Well do not worry
about it because back at the main CAPTCHA
| | 05:49 | page we have an option of seeing
examples. Let us click on that now. The main
| | 05:55 | part of CAPTCHA includes a math option,
which will ask you a question as you
| | 05:59 | can see up here. Let us see some
more examples of this challenge.
| | 06:03 | And you can see there are simple math
problems that most people would be able
| | 06:06 | to do. Going back to Examples, we see
another example of the Image CAPTCHA. If
| | 06:12 | we want to make sure that they
generally are readable and want to have a large
| | 06:15 | enough sample size to tell that, we
will click on 10 more examples of this
| | 06:18 | challenge and there we have. That is
what it would like. Of course each one
| | 06:22 | will be different when the user sees it.
| | 06:25 | Going back to our Examples, let us
take a look at some of the Text CAPTCHA
| | 06:29 | challenges. These are all what is the
nth word in a certain phrase and then you
| | 06:34 | would type in whatever the nonsense
word is. The problem with Text CAPTCHA of
| | 06:39 | this sort of course is it may be
difficult for people who do not read English
| | 06:43 | because they would not be able to
read this what is the third word in the
| | 06:46 | phrase section of the sentence.
| | 06:48 | So now you know about a few of the
basic CAPTCHA options, but how does this get
| | 06:52 | applied in your site. To find out go
to General settings and you scroll down
| | 06:57 | you have an option to put different
types of CAPTCHA in different parts of your
| | 07:01 | site. For example if you want to make
sure everybody entering a comment is
| | 07:05 | really a human you might say, oh! I
think I want a difficult Image CAPTCHA. Let
| | 07:08 | us say for contact_mail you do not
expect vandals to really hit that page as
| | 07:13 | much. Let us try an easier Math (
captcha) and so on. And then of course you
| | 07:17 | would save the options at the bottom.
| | 07:19 | One option that you can add is to Add
CAPTCHA administration links to forms.
| | 07:24 | That lets anybody who has the
permission that lets them administer CAPTCHA,
| | 07:27 | change what is being shown in a
certain area. That is good if you set these
| | 07:31 | settings down here and then really want
to see what they look like on the site
| | 07:34 | and change them on the fly.
| | 07:36 | Down towards the bottom you can change
the description of a CAPTCHA by changing
| | 07:41 | the text in here. That is good if for
example, you think your users already
| | 07:45 | what a CAPTCHA is and you do not feel
this is needed or alternatively if you
| | 07:49 | think they need more explanation or
if they are using a different language.
| | 07:53 | Finally you can force a CAPTCHA every
time the person visits the page or only
| | 07:57 | at certain times. You can set it so
somebody only have to answer the CAPTCHA
| | 08:01 | challenge once and from then on they
will also be able to enter comments and
| | 08:05 | mail and so forth.
| | 08:07 | And finally you can add Log entries
whenever somebody has a wrong response. We
| | 08:11 | will click on Save and we are done. We
have set up our CAPTCHA. Now before this
| | 08:16 | becomes useful to users in general we
have to go back to Administer and as
| | 08:21 | usual go down to Permissions. On the
Permission page you will scroll down to
| | 08:28 | the Captcha module and see that you
have two settings. We already discussed
| | 08:32 | administer CAPTCHA settings a little bit.
| | 08:34 | The other one is skip CAPTCHA. Let us
say that you have a special level where
| | 08:39 | somebody has already proven
themselves how good user they are and you trust
| | 08:43 | that they are not going to abuse your
site. You could for example, give them
| | 08:47 | permission to skip the CAPTCHA. I think
we are just going to leave this the way
| | 08:50 | it is for now though we will go down to
the bottom and click Save permissions.
| | 08:55 | Now let us see how this looks to an
ordinary user by switching to our old
| | 08:58 | friend fishyjoe. You might remember
that fishyjoe has a penchant for adding
| | 09:03 | abusive comments. Let us see if he
can do so now. Click on seeking equity
| | 09:07 | partner. Oh! I think this is stupid, I
add a new comment and I say, oh! That is
| | 09:13 | -- now he has to enter the CAPTCHA. If
fishyjoe is actually a person he will
| | 09:17 | still be able to get pass this. He will
enter his subject. Let us say, "That's
| | 09:21 | stupid! I do not like this subject at
all" and enters the CAPTCHA and let us
| | 09:30 | just say that he enters it incorrectly.
| | 09:33 | Click on Preview and he gets a warning.
The answer you entered for the CAPTCHA
| | 09:38 | was not correct. But generally
speaking of course users will be able to read
| | 09:42 | this. So this is not good for stopping
abusive users. It is however good for
| | 09:47 | stopping abusive robots who will not be
able to this as easily. Well just leave
| | 09:52 | this comment behind and go back home.
| | 09:54 | Finally I should mention MOLAM. MOLAM
is a system that takes submissions to
| | 09:58 | your site passes them through an
external server which then checks it against
| | 10:03 | an algorithm to make sure that it is
not spam. It is some what more effective
| | 10:07 | then an anti-spam system on your
own computer because it is aggregating
| | 10:10 | information from many spammers on
many different sites putting that all
| | 10:14 | together and learning exactly what
sort of spam hits Drupal sites. It is
| | 10:18 | incidentally a company that was founded
by the fonder of Drupal itself, Dries Buytaert.
| | 10:22 | CAPTCHA like other schemes to beat
online vandalism is only a partial solution.
| | 10:28 | Computers might be able to figure
out your CAPTCHA especially if you have
| | 10:32 | configured the module lightly for
better human comprehension. So it is not a
| | 10:37 | perfect system, but it will still
catch a lot of troublemakers and help keep
| | 10:41 | your site clean.
| | Collapse this transcript |
| Using a WYSIWYG text editor| 00:00 | If you are tired of having to write
HTML code just to create style text,
| | 00:05 | FCKeditor is for you. It is free
open source editor that works well with
| | 00:09 | Drupal. It is name by the way comes
from the initial of its originator for
| | 00:14 | Federico Cole Derrick Nobin. There are
other reach text editors as well notable
| | 00:19 | among them being something called
tiny MCE. And partisans on all sides will
| | 00:23 | argue and their editor is the best.
You can see them all in the Filters and
| | 00:27 | Editor section of the module part of Drupal.org.
| | 00:31 | This module as what all modules will
change as new versions are released. As a
| | 00:35 | result the interface and features you
see here might not match what is on your
| | 00:39 | computer. We have al ready downloaded
and installed this module. If you need
| | 00:43 | help doing so see the video in this
series entitled Unpacking and Installing
| | 00:47 | Modules.
| | 00:49 | To turn On the module you have to
Administer and Modules as with any other
| | 00:53 | module. You will then hide the once
at the top just to get to the bottom
| | 00:57 | quicker and there you have it
FCKeditor. We'll enable it and Save our
| | 01:02 | configuration. Now, let us go and
administer by clicking on Administer and
| | 01:08 | searching for FCK by hitting
command F in the MAC or Ctrl+F on a PC.
| | 01:15 | There it is so we click on that but
wait a second we cannot actually administer
| | 01:20 | it because we are missing some parts.
We note this warning that says it is not
| | 01:23 | installed correctly. You have to go
and download the FCKeditor from its home
| | 01:27 | page. Well let us go there. Once there
you can download the editor either by
| | 01:33 | clicking on this zip link or the .gz
link depending on which one is appropriate
| | 01:37 | for your platform. The reason is for
this is that the FCKeditor module for
| | 01:41 | Drupal is really only an interface
between the FCKeditor program and Drupal
| | 01:45 | itself. The program has to
be downloaded separately.
| | 01:49 | We have done that already. So let us go
to our finder and hide everything else
| | 01:53 | to expose it. To install it into the
FCKeditor module, you will open the module
| | 01:59 | and put it in this folder here called
FCKeditor. If you open that folder in
| | 02:04 | fact you will see a text file that just
says Copy Here. We will overwrite this
| | 02:09 | folder by dragging this one in to the
fckeditor 2 folder like so. And yes, we
| | 02:14 | do want to replace it.
| | 02:16 | Now, let us go back to our
administrative interface and reload this page.
| | 02:22 | Terrific! FCKeditor is now working,
however it does warn us that the only
| | 02:27 | person who can use it is the
administrator. No other roles have access to use
| | 02:31 | the FCKeditor. We will fix that right
now by going to administer and scroll
| | 02:35 | down to Permissions. Once there
go down to the FCKeditor module.
| | 02:42 | There are permissions here that are
important. The first is Access FCKeditor. I
| | 02:47 | think I will let all of our regular
users that is authenticated users, use that
| | 02:51 | editor. You can also decide whether not
to allow people to upload files through
| | 02:56 | the FCKeditor, I think I will leave
that alone and, of course, administer
| | 03:00 | FCKeditor let somebody turn it On
and Off and change with the pages that
| | 03:04 | appears on in so forth.
| | 03:05 | I would like the way we have it now,
so I will scroll down to the bottom and
| | 03:09 | then click save Permissions. Then go
back to administer scroll down a little
| | 03:17 | bit and FCKeditor. I have to warn
you that FCKeditor is very hard to
| | 03:23 | administer. It has many settings and is
extremely configurable. But let us take
| | 03:27 | a quick look at exactly what
happens in its default configuration.
| | 03:31 | Let us go to Fishy Joe's account.
Fishy Joe is an ordinary user who we have
| | 03:35 | logged in. In Firefox he might go up to
Create Content and then to Blog Entry.
| | 03:41 | And you'll notice something very
different. The title in blog post categories
| | 03:44 | are normal but under the body you
have all of these options to enter style
| | 03:48 | text. Let us enter little bit of text
just to see what it can do. I think this
| | 03:53 | is great.
| | 03:54 | If we highlight great we can then
make it bold or italic as you can see it
| | 03:59 | works very much like any word
processor you might have used. It has other
| | 04:02 | features as well for example you can
add Links and Anchors if it is a long
| | 04:08 | document. You can even add Images or
Flash Movies. It also has a Smiley Editor
| | 04:15 | so you can enter all sorts of
emoticons in to your message. I am not going to
| | 04:18 | do that right now.
| | 04:20 | FCKeditor has one major drawback for
users that is it overwrites some of your
| | 04:26 | Command key combinations- that is, the
things that happen when you hold down the
| | 04:29 | Command key on the Mac or the Ctrl on
the PC- so they do not work the way you expect.
| | 04:33 | For example the Cmd+L usually
goes up to the address bar and lets
| | 04:37 | you do to the different webpage, but
if you hit that while you are in FCKeditor,
| | 04:41 | it does something completely different.
| | 04:43 | Let us go very quickly back to the
administrative interface. As I mention
| | 04:48 | before FCKeditor is extremely
difficult to configure. However there is good
| | 04:53 | news, there is web site that tells you
specifically how to administer it within
| | 04:57 | Drupal. That web site is at drupal.
fckeditor.net. FCKeditor is touchy both for
| | 05:06 | the user who might loose the post by
hitting the wrong keys, and for the
| | 05:09 | administrator who has a
maze of options to way through.
| | 05:13 | But those who demand style text on
their sites love it for the number and
| | 05:17 | variety of options that it has. And for
how it can make your site more fun and
| | 05:21 | color full for your members.
| | Collapse this transcript |
|
|
14. Building a Navigation FrameworkGetting around with multilevel menus| 00:00 | They say that well organized person can
be comfortable anywhere, even in hell.
| | 00:04 | Along those lines a well-planned menu
system makes a world of difference to the
| | 00:08 | comfort of your site's visitors.
Drupal comes with three built-in menus and
| | 00:12 | allows you to create new ones. We will
show you how. To change your menus, go
| | 00:17 | up to Administer and Menus. As I
mentioned Drupal comes with three menus
| | 00:22 | built-in, Navigation that is the menu
along this left hand side, Primary links
| | 00:28 | which is the menu up here and Secondary
links, which is another level that goes
| | 00:32 | right near the Primary menus.
| | 00:35 | Menu links only appear if you have
permissions to use the links. For example
| | 00:39 | here is the Administrative user; we
see this link called Administer. However
| | 00:43 | the ordinary user fishyjoe does not. We
can take a look at that by switching to
| | 00:47 | Firefox where we have fishyjoe logged
in. To change the programs we hold down
| | 00:51 | the Command key and hit Tab on the Mac
and you see there is no Administrative
| | 00:56 | menu here. We will switch
back to your Administrator now.
| | 00:59 | Let us take a look at how these
Menus are constructed by clicking on the
| | 01:03 | Navigation link here. As you can see it
is a hierarchical menu. So for example
| | 01:09 | we have a link for Blogs and then
inside it My blog. Now that particular link
| | 01:14 | is disabled. We will be enabling it later,
so you can see how that affects the Menus.
| | 01:19 | You can move these items around, so
for example right now we have Feed
| | 01:23 | aggregator underneath Create content,
but let us see want to put it top. We
| | 01:27 | will go down and find Feed aggregator,
there it is and grab the little arrow
| | 01:32 | icon and drag it above Create content
like so. That little asterisk tells you
| | 01:38 | that it would not take effect until
you hit Save. We do that by going to the
| | 01:41 | bottom of the page and
clicking Save Configuration.
| | 01:49 | There, now you see exactly as we
expected Feed aggregator is above Create
| | 01:53 | content, but what about the Blogs item
here. We click on enabled if you we want
| | 01:58 | to turn it on and scroll down to the
bottom and save one more time. And now we
| | 02:06 | see Blogs up here. You will notice
that Blogs is different from My Account
| | 02:11 | because has this little turned down
triangle next to it. What that means as
| | 02:15 | when you click on Blogs you
can see an item underneath it.
| | 02:19 | But what if you always want to see
that item underneath it? Let us go back to
| | 02:23 | Administer and Menus and Navigation
to affect that menu. This item here
| | 02:30 | Expanded means it will always appear
open so you can see its child items. We
| | 02:34 | will click on Expanded, scroll to the
bottom again and click Save Configuration.
| | 02:42 | There now no matter where we are in
the Menu we see My Blog underneath Blogs.
| | 02:47 | Let us go and edit that menu item by
clicking on edit under Operations. As it
| | 02:53 | happens Blogs is one of the menu items
that is built-in and in fact all of the
| | 02:57 | items under Navigation are built-in
since we have not added any of our own
| | 03:01 | custom menu items. You can also tell a
built-in item because you cannot change
| | 03:06 | the path. It is hard coded in to Drupal.
| | 03:09 | However you can change other item such
as its weight that is to say, where it
| | 03:13 | appears in the hierarchy whether the
top or bottom. Its description, which is
| | 03:18 | text that appears when you hover over
the link, and some other things, again
| | 03:21 | Enabled and Expanded. You can also
change its Parent item. If for example we
| | 03:26 | wanted to put Blogs underneath My
account, we would click on this drop-down
| | 03:30 | menu, go down to My account and click on Save.
| | 03:34 | We do not actually want to do that.
So we are going to change that back to
| | 03:37 | Navigation and click Save. While we
have this hierarchical structure in the
| | 03:44 | navigation menu we do not actually
have the same thing in our Primary links.
| | 03:48 | Let us take a look at that. We will do
that by going back to Administer Menus
| | 03:52 | or just this little shortcut here Menus,
then click on Primary links. Here we
| | 03:58 | see the two items that we added earlier.
Let us say that we wanted Contact us
| | 04:02 | to be underneath About Us.
| | 04:04 | What we would do as with other screens
in Drupal where you can drag and move
| | 04:08 | things about is grab that arrow icon
move it inward a little bit, so it creates
| | 04:12 | a hierarchy. Click on Save
configuration and because we do not have a hierarchy
| | 04:18 | in the Primary links, it simply
disappears. You cannot reach it. We are going
| | 04:22 | to move it back out again, so you can
see it. The changes that you make here
| | 04:28 | will affect all users.
| | 04:30 | So let us switch again to fishyjoe and
take a look at what his menus look like.
| | 04:36 | To do so we reload the page by going
back to the Home Page and you could see
| | 04:40 | now he has Blogs and My blog and of
course clicking on those take you to the
| | 04:44 | places that you expect. Let us switch
back to the Administrative interface
| | 04:48 | again. There is another place that you
can enter items to put into Menus and
| | 04:53 | that is when you create content.
I will show you how to do that.
| | 04:56 | Click on Create content and then let
us say, a Blog entry. You have the Title
| | 05:02 | and Blog post categories. Let us
just create a very simple thing here. My
| | 05:07 | thought about the recent election and
we will have that under Lifestyle. And we
| | 05:16 | would enter in the body whatever it is
that we are going to enter there. But
| | 05:19 | first let us take a look at Menu
settings. We want this to be in a menu that is
| | 05:24 | up at the top. That is why I think it
is very important that is goes up here,
| | 05:27 | but instead of being at the same
level as Primary Menus we want it in the
| | 05:31 | Secondary links.
| | 05:32 | So we will change this Parent item to
secondary links and let us say election
| | 05:37 | thoughts. We will leave the Weight
alone for now. Go down to the bottom and
| | 05:42 | click Save. Now we have our Election
thoughts link right up here and clicking
| | 05:47 | on it goes to the page as we expected
to. I am going to go back and edit that
| | 05:52 | up. We can edit any menu item by going
back to Administer and Menus. That one
| | 05:59 | since it is in the Secondary links will
be under here and then of course it is
| | 06:03 | easy to edit or delete by clicking there.
| | 06:06 | As with everything else on Drupal it
asks us to confirm before we delete. We
| | 06:11 | say, yes and as you notice it is gone.
There is one another thing to cover. In
| | 06:17 | Administer and Menus and that is this
little tag up here, Settings. As you can
| | 06:23 | see it is a very short page and the
second two items Primary links and
| | 06:27 | Secondary links here are usually not
changed because of course you want Primary
| | 06:31 | links to go to Primary links and not
Secondary links or Navigation unless you
| | 06:34 | are doing some custom theming.
| | 06:36 | However this first one is the place
that the Menu will automatically go unless
| | 06:40 | you change it when you create new
content and decide that you want to put it
| | 06:43 | into a Menu. I will show you that
by going Secondary links and Save
| | 06:48 | configuration and then Create content
again, Blog and Menu settings. See now
| | 06:54 | the default is Secondary links.
Menus are especially helpful when you are
| | 06:59 | building authoritative content driven
sites when you want specific content very
| | 07:03 | accessible to members in a Menu.
| | 07:06 | Menus are great for helping things on
your site stand out, but as with all neat
| | 07:10 | toys in Drupal be careful not go
overboard. If you put too many menu choices on
| | 07:15 | your site they all blend into a gray
mass and nothing stands out, but with
| | 07:19 | restraint a few judiciously placed
menus make important information and your
| | 07:23 | site much more accessible.
| | Collapse this transcript |
| Building custom menus| 00:00 | As much as I love Drupal I disagree
with its some parts of its design. One of
| | 00:05 | those parts is the default Navigation
menu, which makes use of every part of
| | 00:08 | the pig except the squeal. So on my
site I replaced with it a custom menu that
| | 00:13 | was shorter and discover just how
useful custom menus are in general whether
| | 00:17 | you use them to replace the Navigation
menu as I did or for some other purpose.
| | 00:21 | Let us go to my site and take a look
at that. One of the things I did was I
| | 00:25 | combine the name of the person logged
in with the log out command here. I did
| | 00:30 | this through a PHP code snippet that I
got from drupal.org. We will show you
| | 00:34 | how to do that in another part of
this series. If we switch back to out
| | 00:37 | original site you will see that the
name of the person logged in and log out
| | 00:41 | are in two different places and I
thought that took up too much space.
| | 00:45 | Let us built a similarly simple
Navigation menu for our site. We are just going
| | 00:49 | to have two items in it; blogs and
feed aggregator. Of course you can put in
| | 00:54 | what ever items you like. The next
thing to do is to figure out what URLs we go
| | 00:58 | to when we go to click on those items.
So, let us do it. Click on Blogs and we
| | 01:03 | go to \blog. Remember that because
we are going to be using it in minute.
| | 01:07 | Click on Feed aggregator and we go
aggregator. Once again we have to remember
| | 01:12 | that. Another way to tell what the
links are is to look in some browsers which
| | 01:16 | have information area, for example in
Fire Fox when you hover a link at the
| | 01:21 | bottom of the screen down here, it
tells you what that link is where you are
| | 01:25 | going to go. I am switching back
now to Safari so I can look at my
| | 01:29 | administrative interface.
| | 01:31 | To add our custom menu we go to
Administer and then Menus. From here we go to
| | 01:37 | Add Menu. First, the menu name. This
is going to be the machine-readable name
| | 01:43 | of this menu. When you enter a machine-
readable name it is best not to have any
| | 01:46 | underscore or spaces because the
machine won't understand them. The specific
| | 01:50 | details about what machine-readable is
are given underneath the entry field,
| | 01:55 | but we will just keep it
simple and call it new Navigation.
| | 02:00 | For the title we will just call it
Your menu and will leave the description
| | 02:04 | blank for now. This part at the bottom
about the ID for excluding and including
| | 02:08 | this element is actually an advance
topic, which we won't be covering in this
| | 02:12 | course. We click on save, good. Now,
let us take a look at all of the menus by
| | 02:17 | again going to Administer and Menus.
There it is there is our menu. We click on
| | 02:23 | it and now we can start adding items to it.
| | 02:25 | You remember we wanted to have two
things there, the blog and the aggregator. I
| | 02:29 | will add an item and here we enter the
path. This is going to be the URL where
| | 02:36 | we go when we click on it. You do not
have to put that leading slash so we just
| | 02:40 | put log for the blog and then in the
menu link title I am just going go say
| | 02:44 | logs.
| | 02:46 | For description we will enter what we
are thinking now. We will have it enabled
| | 02:51 | and we won't have it expanded because I
do not want to show that my blog. It is
| | 02:54 | just going to be a simple menu. The
parent item tell us where this menu items
| | 02:59 | going to go, since we created it coming
from the Your menu choice it decides of
| | 03:03 | course we are going to put it in Your
menu, but we could decide at the last
| | 03:06 | minute, oh no, we want to put it in
the Navigation menu underneath Site
| | 03:10 | Configuration in which case we will
change the pop up menu to there. But we are
| | 03:13 | not going to do that.
| | 03:15 | Weight controls are how high or low
the items appears on the menu and we are
| | 03:19 | just going to click Save because we
only have one item here. Good! We have
| | 03:23 | created out first item now we will
create our second one, that feed aggregator,
| | 03:28 | we do the same process again add an item.
Remember the path we were going to is
| | 03:32 | aggregator and the Menu link title, I
do not like Feed Aggregator no one knows
| | 03:36 | what that means, so I am just going to
say News, and for description I will say
| | 03:40 | all that fit to feed.
| | 03:44 | Again we will leave that enabled but
not expanded same here same here. Leave it
| | 03:48 | as it is and click on Save. And our
menu has been created. But where is it, we
| | 03:54 | do not see it anywhere up here. That
is because when you create a menu it is
| | 03:58 | created as a block and you have to
enable it some where on your page.
| | 04:01 | Let us do that now we do so by going to
Administer and then over to Blocks. You
| | 04:08 | see the Navigation menu is right here,
if we scroll down we see that menu that
| | 04:14 | we just created called Your menu is
down in a disabled area. We are going to
| | 04:18 | move that up to the left sidebar and
Save it. Now, we have both the Admin menu
| | 04:24 | here and Your menu down here at the
bottom we do not really need both. So I am
| | 04:29 | going to get rid of the Navigation menu
at this point. Go to None and that gets
| | 04:34 | rid of that and then I am going
to move Your menu up to the top.
| | 04:38 | Once again we go to the bottom of the
page, Save Blocks, there we now have a
| | 04:43 | very simple menu up here instead of the
Navigation menu. I am actually going to
| | 04:47 | change it back. To do so we just
reverse the process. Take Your menu, make it
| | 04:52 | None, scroll down to the Navigation
menu, make it left sidebar. Save your
| | 04:59 | blocks and then move it around to
wherever you wanted, it. It was originally
| | 05:02 | underneath user log in which only
shows up by the way when you are not logged
| | 05:06 | in.
| | 05:07 | Scroll to the bottom, Save Blocks and
we are back where we began. A lot of what
| | 05:13 | makes the site attractive is having a
clear Navigation path and being able to
| | 05:17 | create customize menus makes that goal
possible. In designing menus I recommend
| | 05:22 | that you be as spare as possible but be
prepared to invest time in figuring out
| | 05:27 | which menus are really important. The
best way to do that is with user testing,
| | 05:31 | watch where people actually go the
most and make menus so they can go there
| | 05:35 | easily.
| | 05:36 | Less is more, and to repeat one of my
favorite quotes, making it easy is hard.
| | Collapse this transcript |
| Creating easy-to-navigate books| 00:00 | Drupal's built-in page and story
content types are fairly straight forward,
| | 00:04 | each single page of contents stands
on its own but Drupal includes another
| | 00:08 | content type that lets you combine a
series of pages into a sort of online book
| | 00:12 | with single click links to go back and
forth just like turning the pages of a
| | 00:16 | real life book. This content type
is especially handy for sequential,
| | 00:20 | instructional material and is in
fact used on the drupal.org web site to
| | 00:24 | presents its tutorial handbooks.
| | 00:26 | Let's take a look at that site now to
understand how books work. We have gone
| | 00:30 | straight to the Drupal 6 handbook,
which you can see at getting-started/6. The
| | 00:35 | book itself is divided into two
sections Install Drupal and Administer Drupal;
| | 00:40 | if you click on either of these you
will see the chapters that it contains, if
| | 00:45 | you click on up you will go back to
your original page. This is like going into
| | 00:50 | the pages of a chapter, if that
chapter is subdivided into sections, you can
| | 00:54 | see how there is a multilevel hierarchy.
You can also page through the book by
| | 00:59 | going to the right like this and this
and so forth. I am going to go up again
| | 01:09 | and up one more time and you can also
add additional pages by adding child
| | 01:14 | pages. Once again in the hierarchy,
the child is the one that's immediately
| | 01:18 | below the level that you are looking at.
This will become clear as we go along.
| | 01:23 | The big difference between Drupal
| | 01:24 | books and the way you think of real
life books; is that in the real world books
| | 01:29 | have a variety of parts, there is a
cover, a chapter title, subtitles and body
| | 01:34 | text. Some of those parts don't
actually have any content, for example the
| | 01:37 | cover doesn't tell you anything expect
the name of the book, it doesn't contain
| | 01:41 | a lot of information just the name. In
a Drupal book every part is equal and
| | 01:46 | has both a title and the body. I know
that doesn't make much sense now but you
| | 01:50 | will see what I mean in a minute. Let's
switch back to our site; to make books
| | 01:55 | you first have to turn on the module
book, to do so we go up to Administer and
| | 02:01 | Modules and then scroll down until we
see Book. Turn it on by clicking it;
| | 02:08 | scroll down to the
bottom and Save Configuration.
| | 02:13 | As with most modules there are
permissions associated with the book content
| | 02:16 | type, lets go to Administer and
Permissions and search for the word book by
| | 02:24 | hitting Command F on the Mac or
Control F on a PC and we see that it creates
| | 02:31 | its permissions inside the book module.
We could for example allow our users to
| | 02:36 | add content to books if the drupal.
org site allows and then we could have
| | 02:39 | contributing users be able to create
new books and so forth. We are not going
| | 02:44 | to change any of the default Permission,
so we can just go back up to the top
| | 02:47 | of the page if we like. Okay, so let's
create our book, to do so go to Create
| | 02:53 | content and then click on this new link,
Book page. For our Title we are going
| | 02:58 | to say Home Repair.
| | 03:00 | One thing that maybe confusing is that
you see a Body here and that might make
| | 03:04 | you think that you have to enter it but
it doesn't have the red asterisk; this
| | 03:07 | is not a required part of the page, you
can just leave it blank. We scroll down
| | 03:12 | further and we see have a new choice
here Book outline. The main part that we
| | 03:18 | change in the Book outline is what
Book it belongs to. In this case we are
| | 03:21 | going to create a new book; this will
be like the title page or the cover of a
| | 03:25 | real life book, create a new book and
then say Save. Great, now that we have
| | 03:32 | done that, we are going to add four
sections to our book; these will be called
| | 03:36 | Roof, Foundation, Electrical and Plumbing.
| | 03:39 | We do all of these as children of the
book that's called Home Repair, as though
| | 03:43 | these are chapters. To do so click on
Add child page, the Title is going to be
| | 03:49 | Roof and again we don't need any Body;
going down a little bit to Book outline,
| | 03:55 | we want it to be in the book Home Repair,
now the reason it shows up by default
| | 03:59 | as Home Repair is because we clicked
on Add child. So it automatically filled
| | 04:03 | in this field and this field; click
on Save and we will do that three more
| | 04:08 | times. First we have to go back up to
Home Repair and add another child page,
| | 04:15 | title will be Foundation. Once again we
scroll down, make sure that yep it's in
| | 04:19 | Home Repair, Save. Go back up so that
we are at our Home Repair page, add a
| | 04:25 | child, Title Electrical, Save that.
Go up to our book, add a child page and
| | 04:36 | Plumbing; go down and Save.
| | 04:41 | Great, now if we go back up we see that
we have this book Home Repair which has
| | 04:45 | four sections but where is this book,
how can we actually look at it? As it
| | 04:50 | happens when you turn on the book
module a page is created at /book, there. Now
| | 04:57 | we see our book; if we had created more
than one of course we would see a list
| | 05:00 | of books. Click on it and we go right
back to where we were. As I look at this
| | 05:06 | book, I think I want to divide this
into sections, I think Electrical and
| | 05:10 | Plumbing should be in Systems
whereas Foundation and Roof should be in
| | 05:14 | Structure, lets do that. It may be
natural to think oh well how do I create a
| | 05:18 | container for those two things but
remember everything in a book is a page.
| | 05:23 | So we are going to go ahead and just
add a another child page here and we will
| | 05:27 | call this Systems and once again go
down make sure its in the right place, yep
| | 05:32 | its in Home Repair and Save. Once again
we will go up, create a child page, and
| | 05:39 | call that Structure and Save it. So
now we have six pages that are really all
| | 05:46 | on the same level and we want to create
a hierarchy; to do so go to Administer
| | 05:51 | and Books. Now we see our book with
this Operation, edit order and titles;
| | 05:57 | click on it and you see that familiar
little icon with the arrows. We are going
| | 06:01 | to put Electrical into Systems like
this, by dragging it down and then in a
| | 06:06 | little bit so you can see the hierarchy.
We will move Plumbing into the same
| | 06:10 | area, not as the child of Electrical
but as a child of Systems. Roof of course
| | 06:15 | goes into Structure and Foundation also
goes into Structure like that. Click on
| | 06:20 | Save Book Pages.
| | 06:22 | Now we have given our book some
structure, lets take a look at how that looks
| | 06:26 | by going back up to /book. Click on
Home Repair, now we only see the two top
| | 06:33 | levels, we click on either one of them;
say Structure, now we see the two ones
| | 06:38 | that are underneath it. There is one
big weakness about this structure though.
| | 06:42 | You don't really see a hierarchical list
; you just have to go in drilling down
| | 06:46 | and drilling down. You can also use
these forward and next pages but its still
| | 06:51 | not very clear, for example this
Foundation section, we see Roof comes next and
| | 06:55 | Structure comes previous but that
doesn't tell us about the hierarchy.
| | 06:59 | In order to see the hierarchy we are
going to add this book as a block. To do
| | 07:03 | so go to Administer and Blocks; you
see every book that you create, creates a
| | 07:09 | page that is some place that you can go
by going to /book and then clicking on
| | 07:13 | the link. It also creates a block,
which I am about to show you, and it creates
| | 07:17 | a menu, we will go through both of
those now. We are now in Administer, Blocks,
| | 07:22 | if you scroll down to the bottom you
will see Book navigation block. We will
| | 07:27 | take that and we will put it in the
Left hand sidebar and Save Blocks. As with
| | 07:34 | other blocks it gets put at the bottom
and we can move it up if we like, let's
| | 07:38 | do that just for the moment, we move
it up and Save Blocks, there. Now we see
| | 07:44 | our Home Repair book and of course if
we had other books we would see those as
| | 07:47 | well.
| | 07:48 | When we click on it, now we can see
the structure a little better, click on
| | 07:52 | Structure, there is our hierarchy.
Let's go back to Blocks and take that one
| | 07:57 | out, so I can show you menus. Go to
Administer, Blocks and turn off Book
| | 08:03 | navigation by going to none and saving.
Now we will go to Admin and Menus. Once
| | 08:13 | you are in the Menus page, click on
Navigation and we see all of the things
| | 08:17 | that are in this Navigation menu. If
you scroll to the very bottom, you will
| | 08:23 | see this- Books (disabled). Let's
enable it by clicking here. You can see
| | 08:27 | it's in the Enabled column and saving
the configuration. Now at the very bottom
| | 08:33 | of your Navigation menu you see Books,
when you click on it, it just goes to
| | 08:37 | that book page, not as useful.
| | 08:39 | In my opinion Drupal's book
structure really needs the Block to make it
| | 08:43 | worthwhile and once you are in a book,
it's not as easy or obvious as it could
| | 08:47 | be. But you do get some nice benefits
from books, for one numerous people can
| | 08:52 | create book pages with one editor
rearranging them as needed, in short books
| | 08:57 | are best for content that's intended
to be part of a cohesive whole with
| | 09:00 | multiple contributors and central
moderators that's why drupal.org is built on
| | 09:05 | books and if it's good enough for the
Drupal project, its good enough for me.
| | Collapse this transcript |
|
|
15. Advanced Tips for PHP ProgrammersChanging page templates with PHP| 00:00 | If you want complete control over how
your theme behaves and in particular how
| | 00:04 | it handles custom created content
types, you need to hack at the PHP that's
| | 00:08 | contained within the sites page
templates or use a module called Content
| | 00:12 | Templates or Contemplate. We will show
you both methods but we are not going to
| | 00:17 | go deeply into how to actually code the
changes, that could be an entire course
| | 00:21 | in itself. Instead we will get you
started by explaining the template systems
| | 00:25 | logic, where to find the files and
the basics of how to play with them.
| | 00:29 | The first we are going to do is we are
going to look at the files that make up
| | 00:32 | the theme; we go to the folder where we
first installed Drupal. For us we click
| | 00:37 | on the Finder, go to Finder, Hide
Others and that exposes the folder where we
| | 00:41 | installed Drupal. Since we are using
a theme that came with Drupal, we are
| | 00:46 | going to find it in the themes folder.
If you are using a theme that didn't
| | 00:49 | come with Drupal you will probably
find it inside the sites folder, either in
| | 00:53 | the all or the default folders. Our
theme is Bluemarine, so we open up themes
| | 00:58 | and Bluemarine. We sort by Kind or
Type and we see all of the templates
| | 01:03 | together, they are the ones that end in
.tpl.php. The one we are concerned with
| | 01:09 | is page.tpl.php; before we do anything
else I want to back this up. So I will
| | 01:15 | highlight it, hit Command C or Control
C on the Windows machine and then paste,
| | 01:21 | which is Command V or Control V on a
Windows machine; that creates a copy.
| | 01:25 | I am just going to label that, tpl.php-
BACKUP. Now let's go in and play with
| | 01:34 | this code by opening it up in the Text
Editor. As you can see the page template
| | 01:39 | is a mixture of PHP code and plain old
HTML. We are going to change this so the
| | 01:45 | left column in our site disappears
entirely, that is if we go back to our site,
| | 01:50 | we will see none of the stuff over here.
Don't worry we will change it back by
| | 01:54 | reverting to our backup; this is only
an example of what you can do with your
| | 01:57 | page template. Of course to do more
complex things you will need to know PHP;
| | 02:03 | if you are a lynda.com premium
subscriber or you are watching this series on a
| | 02:07 | disk you can open up the Exercises
File 15_01. Here we have opened up that
| | 02:13 | exercise file which explains
what exactly we are changing.
| | 02:16 | Again don't worry if you don't
understand this, I am just showing that you can
| | 02:20 | change things not how to change them.
So we are going to search for this text
| | 02:25 | in here, php if left etcetera, etcetera.
To find that I am going to search for
| | 02:31 | that $left, so I do Command F or
Control F in your PC and there it is, php if
| | 02:40 | left etcetera, etcetera. Let's compare,
to make sure it looks the same, yep
| | 02:45 | very good and we will replace the
entire bit between this and this. Now we go
| | 02:51 | and take the text that we want to
change it to, copy it with Command+C or
| | 02:55 | Control+C if you are using a Windows
machine and paste it in and save it. We
| | 03:03 | will close that file and go back to
our site, now we reload the page by
| | 03:08 | clicking on reload; there it is
we have removed that left column.
| | 03:12 | Let's change it back though because of
course we don't want to leave it this
| | 03:15 | way but you can see how much you can
change a page with just a little bit of
| | 03:19 | code. To change it back, we go back
to our Finder, first we will get rid of
| | 03:23 | that page.tpl.php file that we just
changed; by dragging it to the Trash if you
| | 03:28 | are using a Mac, or by Right-clicking
and selecting Delete if you are using a
| | 03:35 | PC. Then we will rename our backup,
back to its original name and if we go back
| | 03:42 | to our site and reload we see
everything is back to normal. But what if we want
| | 03:48 | to change the layout of a specific
content type, that is, have the blog look
| | 03:52 | different from the way it is now.
Let's take a look at what the Blogs do look
| | 03:55 | like, we have a title and we have this
submitted information and then we have
| | 04:00 | additional stuff down here.
| | 04:01 | Let's say we want to get rid of this
additional submitted information. To do
| | 04:05 | that we go back to the folder that
contains those templates and again I go to
| | 04:09 | the Finder and hide everything else
on the Mac and we take the node file,
| | 04:14 | node.tpl.php, copy it and paste it to
make a backup, call that one BACKUP. Then
| | 04:25 | we are going to copy it and paste it
one more time, that second copy we will
| | 04:30 | call node-blog.tpl.php and there we go.
Drupal looks for a file that has this
| | 04:41 | particular sort of name and it uses
the machine-readable name for the content
| | 04:45 | type. Let's go back and see how we
can see those machine-readable names; in
| | 04:49 | your administrative interface you
would go to Administer, Content types and
| | 04:54 | it's this, this blog, or book or forum.
| | 04:57 | So if you wanted to change the way that
forum topics look we would change it to
| | 05:03 | node-forum.tpl.php. Let's open that
in the Text Editor, as you can see the
| | 05:10 | Content types are actually quite simply
defined, there is not a lot of code in
| | 05:14 | here. As it happens, I know that the
part that I want to comment out from doing
| | 05:18 | some research is this right here, span
class = "submitted" etcetera, etcetera,
| | 05:22 | everything between the open span and
closed span tags. I am going to use an
| | 05:26 | HTML comment to do so and again if you
don't know HTML don't worry about it too
| | 05:30 | much because the point is not to learn
how to do this but that you can do it
| | 05:34 | and if you want to learn more about how
HTML works, you can watch the Essential
| | 05:38 | Training video from lynda.com. We will
close out that comment tag and save it.
| | 05:44 | Now lets go back to our site, go to
the Blog and you notice we no longer have
| | 05:50 | that submitted information. We have
effectively changed the way that, that
| | 05:53 | Content type appears on the site. If we
click on it, it still doesn't appear. I
| | 05:58 | am going to return our blog to the way
that it was by replacing it once again
| | 06:02 | with just the simple node template. To
do so we go back to our Finder and hide
| | 06:06 | everything and then we just throw away
this file we created, node-blog. We can
| | 06:13 | also throw away our backup since we
didn't end up using it. Now if we go back
| | 06:19 | to our site and reload the page, there
we have our submitted information again.
| | 06:25 | If you want to learn more about how
you can affect Content types in this way,
| | 06:29 | there is page on the drupal.org site,
drupal.org/node/44699 and there you have
| | 06:40 | it. But let's go back to our site;
there is one other way you can make such
| | 06:46 | changes without having to muck around
in the PHP file, that's where the module
| | 06:50 | called Contemplate or Content Templates.
We have already downloaded it, so now
| | 06:55 | we are going to turn it on by going
to Administer and Modules. Contemplate
| | 07:00 | works with CCK type, so you also have
to have the CCK module installed. It's a
| | 07:05 | little bit tricky to find on this
page however because it's inside the CCK
| | 07:09 | group and here it is as Content
Templates, go to the bottom and Save
| | 07:15 | configuration. Now we go to
Administer and we have a new choice, Content
| | 07:21 | Templates, if we go to a Blog Entry
and Create Template. We will see that we
| | 07:27 | have a lot of options of what we can do
to change the Teaser, the Body and even
| | 07:32 | the RSS feed if we are
feeding this out to outside sites.
| | 07:35 | We are not going to go into all of
the ways you can change it because it's
| | 07:38 | quite complicated and in fact is its
own programming language. But believe me
| | 07:43 | it's much easier than programming the
PHP by hand. But for right now we are just
| | 07:47 | going to go back to our home page. As
you can see these are all tools that
| | 07:51 | should be used with a very light hand
and I can't stress how important backups are.
| | 07:56 | While preparing this video, I
commented out one too many lines from a PHP
| | 08:00 | file, literally just a few characters,
and my entire site disappeared.
| | 08:05 | If you can get done what you want with
Contemplate, stick with that but for
| | 08:09 | really profound changes don't be
afraid to backup and reach straight into
| | 08:12 | Drupal's template files.
| | Collapse this transcript |
| Using PHP in content| 00:00 | We are now going to discuss an
incredibly powerful part of Drupal, the ability
| | 00:04 | to use PHP code within a page's
content. PHP has access to many of the
| | 00:09 | inner-workings of your Drupal site
allowing to essentially rewrite the site on
| | 00:13 | the fly. However its power can also
lead to unbelievably huge security holes
| | 00:18 | and a relativity small error could
make your entire site unavailable or even
| | 00:22 | destroy critical information. The
example we will give was taken from the
| | 00:26 | drupal.org site and has been shown to be safe.
| | 00:29 | The first thing that we need to do is
to turn on the PHP filter module. To do
| | 00:34 | so go to Administer and Modules and
then scroll down until you see PHP filter,
| | 00:44 | turn that on. Scroll to do the bottom
and click Save Configuration. The second
| | 00:50 | thing you will need to do is to turn on
the Input format call PHP and make sure
| | 00:55 | that the PHP evaluator is turned on
within that input format. To do so go to
| | 00:59 | Administer, scroll down to Input
formats, click on it and go to the PHP code
| | 01:07 | choice and click configure. I scroll
down here and turn on the PHP evaluator
| | 01:13 | just in case it's not on. Usually it
will be but sometimes you might turn it
| | 01:17 | off for safety, go down to the
bottom and click Save Configuration.
| | 01:21 | Now we are ready to enter PHP code, but
first we need a place to enter it. I am
| | 01:26 | going to create a block that I will put
in the top right-hand corner showing an
| | 01:30 | endorsement, explaining how wonderful
it is to live underwater. To create that
| | 01:34 | block, we go to Administer and Blocks
and then add a new block. We will call
| | 01:41 | the block Endorsements and the Block
title as well will be Endorsements. If you
| | 01:49 | have a Rich Text Editor, such as
FCKeditor turned on, it's best to turn it off
| | 01:53 | before you start playing with PHP code.
You might end up entering styled HTML
| | 01:58 | that could interfere with your code.
But first we are just going to enter plain
| | 02:02 | text, if you are a premium member of
lynda.com or received this course on a
| | 02:06 | disk you have an Exercise File 15_02
which includes a text document containing
| | 02:12 | all of the text you are about to see.
| | 02:13 | I am going to go there now so I
can copy and paste the text. For the
| | 02:18 | Endorsements Block, I just copy,
Command C on the Mac or Control C on a PC and
| | 02:25 | paste it in there with Command V or
Control V on a PC. In this case we have
| | 02:30 | HTML code in here so we are going to
make sure that our Input format is Full
| | 02:35 | HTML, scroll to the bottom and save the
block. Now we have to enable that block
| | 02:42 | by bringing it into that right column
and then move it up to the top. So we
| | 02:46 | scroll down, there it is Endorsements;
I will move it into the Right sidebar
| | 02:51 | and save the block. Then in the Right
sidebar once again I will bring it up to
| | 02:55 | the top, scroll to the bottom and save
the block, and there it is. Now we are
| | 03:02 | going to turn that into dynamic
content, thanks to PHP; we have three
| | 03:06 | endorsements and we are
going to rotate among the three.
| | 03:10 | To do so we will go back to that
block and edit it, again we have the
| | 03:13 | Endorsements block right here and click
configure. Now I am going to go back to
| | 03:18 | our example file and copy and paste
the PHP code. Here's the code. I copy it,
| | 03:26 | switch back to my site, erase what's
there and paste it. Don't worry if you
| | 03:33 | don't understand this PHP code,
although of course if you are working with PHP
| | 03:36 | code in your site you should know
exactly what it does and how it does it. We
| | 03:41 | also have to make one more change,
which is to change the Input format to PHP.
| | 03:45 | We will open up this turn down
triangle and click on PHP code. Then go to the
| | 03:50 | bottom of the page and save the block,
there. We now have a random endorsement
| | 03:57 | up here, we can show that it's
random by repeatedly reloading the page.
| | 04:01 | Let's go Home for example, that's the
same one but if we Reload, there is a
| | 04:07 | different one. One more time and again
there is the other one, of course you
| | 04:14 | might get two of the same ones in a
row because that's the way random numbers
| | 04:17 | work but you can see its dynamic
content. If you need help for how Drupal
| | 04:21 | handles PHP code you can always get it
by going to any Create content page like
| | 04:27 | create Blog entry, go down to
Input format and then click on the More
| | 04:31 | information about formatting options.
Up here it gives you information about
| | 04:35 | all the HTML that shows up in Drupal
and if you scroll down to the bottom, you
| | 04:40 | will see all of the details
on how it handles PHP code.
| | 04:47 | You can use PHP for content pretty
much anywhere Drupal accepts inputs using
| | 04:51 | Input formats filter, that is,
wherever you are given a choice of Filtered
| | 04:55 | HTML, Full HTML or PHP that includes
blocks as well as the body fields of most
| | 05:02 | node types. There are dozens of bits of
useful and interesting PHP code on the
| | 05:06 | drupal.org web site, where they are
called snippets. Just be sure you remember
| | 05:11 | to turn on the PHP module and PHP
Input format to make them work and more
| | 05:15 | importantly be extremely
careful about the code you use.
| | Collapse this transcript |
| Implementing PHP snippets| 00:00 | The main method for extending Drupal's
functionality is through modules. That is,
| | 00:04 | downloadable packages of code that
add specific abilities to your site. But
| | 00:08 | some tricks don't require an entire
module. Small passages of PHP code called
| | 00:13 | Snippets by the Drupal
community will do the job just fine.
| | 00:17 | We'll show you where to find such
snippets, how to implement them on your own
| | 00:20 | site and some traps to watch out for.
The place to go for snippets is, as with
| | 00:25 | everything else in Drupal, drupal.org.
Once you're on the Drupal site, go to
| | 00:31 | Documentation, scroll down
and go to Beyond the basics.
| | 00:38 | Beyond the basics is of the book type,
so you see you can page back and forth
| | 00:42 | through it. We're going to go directly
to the chapter on Snippets. There are
| | 00:47 | two main types or snippets, the first
one is for themes and this is the biggest
| | 00:50 | area. If you click on it, you see
numerous tricks that you can perform on your
| | 00:55 | own site.
| | 00:56 | You could of course click on any of
these that look interesting to you or page
| | 00:59 | through them as this is a book. Let's
scroll to the bottom and then go back up,
| | 01:05 | so we see all of the snippets. The
other kind of snippets is for content- that
| | 01:10 | is, to change small bits of your
site as we did on our site for our
| | 01:14 | endorsements block.
| | 01:16 | In addition, there are SQL snippets,
which let you change things in the
| | 01:20 | database. There are so many of
these and they're implemented through a
| | 01:23 | different method. You can learn how to
implement SQL snippets by clicking on
| | 01:27 | this link, How to use an SQL snippet.
| | 01:29 | But we're only going to focus on the
PHP ones. Finally, some snippets happen
| | 01:35 | outside of the Drupal interface. That
is, it's PHP which is placed on your
| | 01:39 | server for one reason or another. These
are also contained in the PHP snippets
| | 01:43 | chapter. If you click on it and scroll
down, you'll see an example of this PHP
| | 01:50 | snippet that happens on the server,
this Remote posting and administration.
| | 01:54 | We're going to show you how to
implement one of these PHP snippets. We'll go
| | 01:58 | back up and enter Theme snippets. The
one that we're going to implement is
| | 02:04 | called Add an "Edit" Tab to Every Block,
we scroll down to find it and there it
| | 02:09 | is. Click on it, when you get to this
page, read the instructions of how to
| | 02:14 | implement it.
| | 02:15 | In this case, it gives us a link to an
earlier post, which we'll want to read.
| | 02:19 | But let's pretend that we don't at
this point. We look through and see here's
| | 02:23 | the code that you'd include in your
theme's block.tpl.php file and now we know
| | 02:28 | the file we're going to affect.
| | 02:30 | Before we do anything else, we're going
to find that file and make a backup of
| | 02:34 | it, in case anything goes wrong with
this snippet. We go back to our finder and
| | 02:37 | hide everything else and then go to
our Drupal installation folder. This will
| | 02:42 | be the folder where you first
put Drupal when you started out.
| | 02:46 | We're using a theme that came
installed with Drupal. So, our theme will be in
| | 02:49 | the Themes folder. If you're using a
theme that wasn't installed with Drupal,
| | 02:53 | yours will be in the Sites folder
either in All or the Default folder. But for
| | 02:57 | us, we're going into Themes and then
into bluemarine, which is our theme.
| | 03:01 | There's the block.tpl.php file. We'll
highlight it, copy it either by hitting
| | 03:07 | Command+C on the Mac or Ctrl+C on a
Windows machine and just paste it somewhere
| | 03:11 | else. I'm going to put it on the
desktop. And then I'm just going to add a
| | 03:15 | little bit of text here, so it's clear
that this is the backup, call it BACKUP.
| | 03:21 | There, now we're ready to work on this
file. We open it up in a Text Editor. If
| | 03:26 | this is the first time you've opened
this file, you may get a warning because
| | 03:29 | you downloaded this file from the
internet. Because we know where it came from
| | 03:32 | and we trust it, we're going to say
Open. So, now we've the file open that we
| | 03:38 | want to affect. We also have a
backup made of that file for safekeeping.
| | 03:42 | Now, we go back to that snippet. We'll
copy the text by hitting Command+C on
| | 03:49 | the Mac or Ctrl+C on a Windows machine,
go back to our text file and then click
| | 03:55 | in it and since it didn't mention
where we've to place it, I'm just going to
| | 03:58 | put it anywhere, I'll put it at the
end of the file by hitting Command+V on a
| | 04:02 | Mac or Ctrl+V on a Windows
machine and save it and close it.
| | 04:08 | Let's see how that affected our site.
We go back, we reload the page and now we
| | 04:14 | see a little Edit box here, right
underneath the endorsements. We also see what
| | 04:18 | would be edited. Wait, I thought that
would add the edit capability to all of
| | 04:22 | my blocks. Let's go back and take a
look. Aha! Maybe there are some tips in
| | 04:27 | here.
| | 04:30 | Indeed, if we go back to the earlier
conversation, we see that it only affects
| | 04:34 | custom blocks. This just highlights
why you've to read all the documentation
| | 04:38 | when you use a snippet. But in this case,
it looks like the snippet did exactly
| | 04:42 | what we wanted. Let's try it out.
Click on Edit and there we're, we can edit
| | 04:46 | that particular block.
| | 04:47 | I've decided I didn't like the change
to my site, so I'm going to go back to
| | 04:51 | the earlier version where we weren't
able to edit those endorsements. I go to
| | 04:55 | the finder, hide everything, throw
away that block.tpl.php that we just
| | 05:03 | changed. On the Mac you do that by
dragging to the trash, on the PC by right
| | 05:07 | clicking on the mouse and selecting Delete.
| | 05:11 | Now, I put that backup back into that
folder. I drag it in and change the name
| | 05:16 | back to what it was before, delete the
extra PHP and Backup and let's go back
| | 05:23 | to our site to make sure that took. I
reload the site and indeed the Edit box
| | 05:28 | disappeared. I've to give you a few
caveats though when you use snippets.
| | 05:32 | First of all, there is no central
testing authority for testing snippets, where
| | 05:36 | as the Drupal core project itself goes
through a lot of quality control, there
| | 05:40 | really isn't any for snippets except
for those people who have used it and then
| | 05:44 | commented on it. That leads us to the
second part, read the documentation very
| | 05:48 | well and be sure you understand
it and read all of the comments.
| | 05:52 | Very often, somebody will submit a
snippet and then the comment will say, you
| | 05:55 | know there's a bug in it, I
discovered it this way and then somebody will
| | 05:58 | contribute a patch to it, so it
works correctly. So, do read all of the
| | 06:02 | comments. Next, make sure that you
understand the code as best as you can. I'm
| | 06:06 | not a programmer myself, but if you
look through it enough times, you can start
| | 06:09 | to see the logic of what's happening.
| | 06:12 | Finally, always backup the effected
files first. I can't stress that enough. If
| | 06:17 | something goes wrong with the snippet,
you want to be able to rollback to your
| | 06:20 | situation before you applied it. I love
Drupal Snippets, of course I like that
| | 06:25 | they improve my sites, but just as
importantly, they help me learn PHP and my
| | 06:29 | SQL. I've come to understand how Drupal
works from the inside out because I can
| | 06:33 | see how programmers use
some of its internal variables.
| | 06:37 | And I feel empowered by seeing how one
can just reach into the code and make
| | 06:40 | big changes with very small tweaks.
| | Collapse this transcript |
|
|
16. Launching Your Drupal SiteLaunching your site| 00:00 | So, you've been working hard on making
your Drupal site look and feel the way
| | 00:04 | you want. It has all the functions you
think you'll need, at least to start.
| | 00:08 | Now, it's time to launch. As it
happens, Drupal requires little or no
| | 00:13 | additional work to go from development
to public use. In fact if you've been
| | 00:16 | secretly developing your site on a
public web server, all you need to do is
| | 00:20 | announce its existence and
wait for the hordes to arrive.
| | 00:23 | But here are a few tips that could help
ease that transition. First of all, if
| | 00:28 | you're moving from one server to
another or from your home computer to a
| | 00:32 | server, review the requirements
that we outlined in the video, checking
| | 00:35 | Drupal's requirements. If you have any
questions or can't get the site to work
| | 00:39 | properly, contact the system administrator.
| | 00:42 | Secondly, check all the permissions.
The best way to do that is to go through
| | 00:46 | the registration process yourself the
way that everybody else will and see what
| | 00:50 | parts you can and can't see. Is it the
way you expected? If not, go back as the
| | 00:55 | administrator and make the appropriate
changes. Third, have a beta period.
| | 01:00 | Invite your friends to check out the
site. See what complaints and compliments
| | 01:04 | they may have.
| | 01:05 | You'll be surprised when you've more
eyes looking at your site. Fourth, before
| | 01:09 | you launch, make sure that your backup
routine is perfect on your new system.
| | 01:14 | You may have to change some things.
For example, if you were developing on a
| | 01:18 | desktop computer and are now on a server,
you'll need to use an FTP program to
| | 01:22 | get your files to and from that server.
| | 01:25 | Don't just practice backing up;
actually restore your site from a backup at
| | 01:29 | least once to make sure that that works.
Remember, a backup is only as good as
| | 01:33 | your restore routine. Finally, here
is the procedure to move your site to a
| | 01:37 | server. Go back to wherever you first
installed Drupal. I'm going to do that by
| | 01:42 | clicking on the Finder
and hiding everything else.
| | 01:44 | I've the Drupal folder here, but I
actually need to grab the entire folder. So,
| | 01:49 | I'm going to go up one level, on the
Mac you go to Go and Enclosing Folder. On
| | 01:54 | the PC, you'd just click on the icon
that goes to the Enclosing Folder. This is
| | 01:59 | the folder that goes to your server,
typically be an FTP program. We named our
| | 02:03 | entire folder Drupal. You may have
named it something else such as the name of
| | 02:07 | your site.
| | 02:08 | Whatever you named it, the entire
folder has to go. You may also need to speak
| | 02:12 | with the system administrator of that
server. Inside the Drupal folder, there's
| | 02:16 | one folder in particular that may have
permissions problems, that's the Sites
| | 02:20 | folder. Inside here, all and
default maybe read only and that may cause
| | 02:28 | problems if they're not
copied to your server correctly.
| | 02:30 | If so, Drupal will tell you. Once that
folder has been copied to your server,
| | 02:35 | you also need to upload and SQL
database. I'll show you how to export it now
| | 02:40 | through phpMyAdmin. If you've
phpMyAdmin installed on the server, you can
| | 02:45 | import it the way that we show you in
the backing up your site and restoring
| | 02:48 | your site from backup's videos.
| | 02:51 | To launch phpMyAdmin on your local
computer, go to MAMP or WAMP if you're on a
| | 02:55 | Windows computer, go to Open start page
and then click on phpMyAdmin. To export
| | 03:02 | the database, scroll down and
choose Export and then choose your Drupal
| | 03:06 | database. Scroll down to the bottom
of that screen, select Save as file and
| | 03:12 | then click Go. You can then take
that file and bring it to your server to
| | 03:18 | phpMyAdmin or whatever other
MySQL administrative tool you use.
| | 03:23 | That covers the technical points, but
there are also social points to look out
| | 03:27 | for when you launch a site. First,
assume that people will try to abuse the
| | 03:32 | site. You can always give people more
freedom, but it's hard to take it away.
| | 03:35 | So, start with very little permission
given to the ordinary user and then add
| | 03:40 | more as you start to trust them more.
| | 03:41 | We've shown you several ways of
protecting your site and controlling
| | 03:45 | permissions, but I also recommend that
you look through a part of the Drupal
| | 03:48 | site which has security modules,
that's drupal.org, then go to Download,
| | 03:59 | Modules, scroll down and Security.
Remember to filter according to Drupal core
| | 04:08 | compatibility. To do that, you need to
sign up for the drupal.org website and
| | 04:12 | log in.
| | 04:14 | Next, have realistic expectations,
remember, you may have been working on this
| | 04:18 | site for weeks and months and it maybe
your entire world, but to somebody who
| | 04:23 | doesn't know about it, it's just
another site on the internet. Things may start
| | 04:26 | slow, don't be disappointed, just
work on making it bigger and better.
| | 04:31 | Next, make sure that you've a feedback
loop, so that when people see something
| | 04:35 | that works wrong or right on this site,
they'll tell you and you can improve
| | 04:38 | the site further that way. I
recommend in fact that you add a forum that's
| | 04:42 | specifically for feedback in the
site. I'm doing that now by going to
| | 04:45 | Administer and Forums, adding a forum
and just call it Website Feedback of
| | 04:52 | something like that.
| | 05:02 | With this forum, you'll not only have
feedback, but it will be public feedback
| | 05:06 | which other users can comment on and
then based on public feedback, you can
| | 05:10 | decide what changes to make. Finally,
expect to be surprised, there's such an
| | 05:15 | enormous diversity of people in the
world and they all have access to your
| | 05:18 | website.
| | 05:19 | You might be surprised that exactly
who comes, perhaps a different age group
| | 05:22 | than you expect or a different
interest group than you expect. Try to follow
| | 05:26 | the crowd, but still remember, it's
your site and make it what you want.
| | 05:31 | Launching a site involves a major
switch in the skills you use everyday, up to
| | 05:35 | this point, you've had to focus on design,
configuration and of course, content.
| | 05:40 | Those skills are still needed after you
launch. But now, your primary job is to
| | 05:45 | be a social manager. Unlike in the
world at large though on your Drupal site,
| | 05:49 | you make the rules.
| | Collapse this transcript |
| Joining the Drupal community| 00:00 | Like other successful open source
projects, Drupal has coalesced into a
| | 00:04 | community of people who both develops
sites in Drupal, and develop the Drupal
| | 00:08 | software itself.
| | 00:09 | Such communities are tend to be
programmer heavy and marketing light and Drupal
| | 00:13 | is no exception. However, the Drupal
project has been fairly successful at
| | 00:18 | giving less experienced members ways
to get involved. Here are some ways you
| | 00:22 | can get involved regardless of
your level technological skill.
| | 00:26 | As always the place to go to become
involved in the Drupal community is
| | 00:30 | www.Drupal.org. Once there you will
notice one tab that's especially important,
| | 00:37 | the Contribute link. Let's
click on it and see what's here.
| | 00:40 | This is an overview of several ways
you can contribute to Drupal project. Of
| | 00:44 | course, you could donate, but also
even if you are not a developer, if you
| | 00:48 | don't know how to program. You can help
with documentation and translations. If
| | 00:53 | you are a graphic designer, you can
help out with themes, and each one of these
| | 00:56 | links will lead you to more
information about how those projects are running.
| | 01:00 | Finally the testing part is very
important, and they need less experienced
| | 01:04 | Drupal developers. The problem with
such project is that they tend to attract
| | 01:08 | people who already know Drupal well and
don't really remember what it was like
| | 01:12 | for a new user. If you're that new
user, they need you for both testing and
| | 01:17 | especially for usability.
| | 01:19 | Let's go back up to the top. Once you
start looking around the Drupal site, you
| | 01:24 | will want to get a user login. You do
so by clicking on Create new account. I
| | 01:29 | already have an account so I am going
to log in now. Once you have logged in,
| | 01:35 | you will notice this link here, My
Account. When we go there we can edit many
| | 01:40 | different things that will help others
to determine whether we might be right
| | 01:43 | for their projects and then
they can contact us directly.
| | 01:46 | We can also change the way this home
page looks to us by adding and subtracting
| | 01:50 | certain blocks. I recommend that you
take a good look of all the different tabs
| | 01:54 | up here and fill out as much as you can
and start showing your face within the
| | 01:59 | Drupal community that way.
| | 02:01 | Another way that you can get to meet
other people within the community is by
| | 02:04 | taking part in groups. Some of them
meet face-to-face while some are special
| | 02:08 | interest groups that take place only
online. The place to go for that is
| | 02:12 | www.groups.Drupal.org. Notice that this
has a separate log in, so you will have
| | 02:18 | to create an account here, if you
want to take part in discussions and so forth.
| | 02:23 | Incidentally, when you do start
taking part discussions, records of the
| | 02:27 | comments that you make and the
contributions that you make to the software and
| | 02:30 | documentation projects attracts.
| | 02:33 | Let's go back to Drupal.org site and
see how that works. When you go to My
| | 02:37 | Account you will see this link here,
Track. If you have made any public posts,
| | 02:43 | it will show exactly what they were
and it will show if there have been any
| | 02:46 | replies. Through this tab you can keep
track of all of the different things you
| | 02:50 | are doing and how is talking to you as
well as what groups you have taken part in.
| | 02:55 | Another website you should know
about is the Drupal Association. This is
| | 02:59 | not-for-profit group based in Belgium
whose goal is to build and promote the
| | 03:03 | Drupal community. It's at association.
Drupal.org. The first thing that the
| | 03:10 | Drupal Association does is it accepts
donations. So even if you do nothing
| | 03:15 | else, you can give a small donation
which we will go a long way. Since there is
| | 03:18 | a no paid staff in the Drupal project
all of your money will go towards hosting
| | 03:23 | and other infrastructure points that
are necessary to keep the Drupal project going.
| | 03:28 | Let's go back to the Drupal.org website.
Finally there is one document that I
| | 03:33 | recommend that you read. It's under
About Drupal and Welcome. It's this, how to
| | 03:39 | enact change within the Drupal
community. It gives several tips about the
| | 03:43 | Drupal community. Read this see
what's being done already and then jump in.
| | 03:48 | While the Drupal community can seem
overwhelming now, it's started under the
| | 03:52 | direction of just one person. The
Flemish student Dries Buytaert who, by the
| | 03:56 | way, is still at the helm. It grew
beyond his circle of friends by accretion.
| | 04:00 | Like a pearl it added layer upon layer
rather than through any sudden explosion
| | 04:04 | of growth. It's a lopsided prowl to be
sure. The software side is particularly
| | 04:09 | heavy, but on the whole the community
has gone through these seven or so years
| | 04:13 | remarkably well without
splits or major acrimony.
| | 04:16 | It's a diverse community and it
appreciates the contribution of its members. I
| | 04:20 | know that I will appreciate yours.
| | Collapse this transcript |
|
|
ConclusionGoodbye| 00:00 | Thanks for watching the lynda.com
Drupal Essential Training course. I hope your
| | 00:04 | experiences with Drupal are both
fruitful and enjoyable and I look forward to
| | 00:08 | seeing you on drupal.org, at Drupal
events and in the Drupal community at large.
| | Collapse this transcript |
|
|