2. What is Drupal?
• Drupal is a free open-source software package distributed
under the GPL (“GNU General Public License”) that allows an
individual or a community of users to easily publish, manage
and organize a wide variety of content on a website.
• Common uses:
– Community web portal
– Discussion sites
– Corporate websites
– Intranet applications
– Personal web sites or blogs
– E-commerce applications
– Resource directories
– Social Networking sites
3. First steps
• Download it at http://drupal.org
• Learn the concepts
• Learn how to just walk away (any open
source software has its quirks)
• Know where to find help
– #drupal-support (freenode.net)
– #drupal-consultants (find paid help)
– #drupal (freenode.net)
4. Concepts of Drupal
• Drupal allows for more abstraction than a typical CMS. It’s more of a
“builders kit” made up of pre-designed components (“modules” in Drupal
terminology) that can be used as-is or that can be reconfigured to meet your
needs.
• Page handling
– It’s common to think of a website as a collection of pages, with some functions thrown
in to round it out. In this case you would think of editing in a tree-like hierarchy of
pages.
– Drupal, on the other hand, treats most content types as variations on the same
concept: a node (more on these in a bit). Pages, blog posts and news items (some
possible node types) are all stored in a common pool, and the sitemap is an overlay
that is designed separately by managing and editing navigation menus.
• Nodes hold the structured information pertaining to a blog post (such as
title, content, author and date) or in a news item (title, content, go-live date,
take-down date), while the menuing system creates the sitemap as a
separate layer.
• Other elements (node layout themes, and modules like Views and Panels)
provide the onscreen display of node contents.
10. The install:
• Create a database using phpMyAdmin or
whatever you are comfortable with.
• Create a user that has permissions to this
database.
11. Errors?
• Don’t use Safari, use Firefox
• I had the menu_router error when using
Safari and it was solved by using Firefox
on the install (who knows?).
– http://drupal.org/node/223160
15. The Drupal Flow
• There are 5 main layers in the Drupal
system:
diagram from drupal.org
16. At the core is the “bucket” of nodes – the data
1.
pool. Before anything can be displayed it must
be input as data.
2. The next layer (from center) is where modules
live. Modules are functional plug-ins that are
either a part of the Drupal core (ship with
Drupal) or contributions from the community.
3. Next we have blocks and menus. Blocks can be
diagram from drupal.org
configured in various ways, as well as only
showing on certain defined pages, or only for
certain defined users. Menus are displayed in
blocks.
4. User permissions are next and these are where
settings are configured to determine which
things different user types have access to.
5. Next is the surface layer which is the site
template. This contains most of the XHTML and
CSS, with some PHP tokens sprinkled
throughout to insert content from the system
into correct spots.
17.
18. What is a node?
• Cluster of related bits of data. When you create an
article or a new blog post, you are actually creating a
collection of things such as title, content, author link,
creation date, etc.
• Think of a node as a single puzzle piece
• Using the CCK (Content Construction Kit) you can
create as many custom nodes as you want.
• Each node has a type, referred to as a Content Type.
• Every node has an ID, a Title, a Body (can be
disabled), a creation date, an author and some other
properties.
• All nodes are stored in your database table.
19. More about modules
• You can download modules from
– http://drupal.org/project/Modules
• Make sure to download a module that is
compatible with your current Drupal install
version.
20. More about themes
• There are many themes available for download at
– http://drupal.org/project/themes
• Much like modules, you need to make sure you
download a theme that is appropriate to your
version of Drupal.
• Included in each template is a set of functions that
can be used to override standard functions in the
modules in order to provide complete control over
how the modules generate their markup.
• Templates can be assigned on-the-fly based on
user permissions.
21. Adding features to your system
• Upload module/theme to the system
• Activate with Drupal control panel
• If the module is a block type module then
visit the blocks admin page and add the
new block type to an area of the page.
• Check the user permissions admin page
and see if there are new permissions for
this module.
22. Drupal has many tables
• At its core it has around 50 tables
• Users have their own tables, and some of
them are authors or nodes. Nodes have
relations.
• http://drupal.org/node/1982
– “Load all pertinent information for node 1982,
including whatever relations (comments, users,
etc.) are to be shown”
• Most queries are hard-coded into modules.
23. Awesome Modules
• CCK (Content Creation Kit)
– http://drupal.org/project/cck
– Allows you to add custom fields to nodes
using a web browser
• Additional modules to use with this module:
– computed field: lets you add a PHP-driven quot;computed
fieldquot; to CCK node types
– date: creates an ISO or unix timestamp date field
– email: validated email field
– image field: an image field
– link: a URL field
24. Awesome Modules
• Views
– http://drupal.org/project/views
– Allows a Drupal designer to control how lists
and tables of content are presented.
– Essentially a smart query builder that, given
enough info, can built the proper query,
execute it, and display the results.
25. Awesome Modules
• Admin Menu
– http://drupal.org/project/admin_menu
– Easy to use administration menu
– See it in action
http://www.youtube.com/watch?v=m1yblPg5z
8U
26. Time to play!
• The best way to learn sometimes is to dive
in and start messing around.
27. Enabling Clean URLS
Make a .htaccess file in the root of your drupal directory and add the following:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]