May 2005 Meeting Notes

Submitted by Anonymous on Thu, 05/26/2005 - 2:42pm.

TCPHP May 21, 2005 meeting notes
Topic: Drupal
Presenters: Allie Micka and Chris Johnson

We had about 20 attendees, some of which joined us from the tcwebpros group. Earlier in the week, Allie gave a presentation on Drupal to the tcwebpros.org folks. Those slides are available at http://www.tcwebpros.org/meetings/may-2005-notes. A big thanks to Allie and Chris for tag-teaming this meeting and providing more technical details on implementing a Drupal site. Open Office format slides for their presentation are available at http://www.tcphp.org/files/InstallDrupal.sxi. Thanks to the Renaissance Box for the meeting space.

What is Drupal?
Drupal is a web-based CMS (Content Management System) written in PHP with an SQL database backend (typically MySQL). Drupal is available under the the GPL license.

Installation/configuration:
Chris gave us a quick introduction on how to install Drupal assuming you were on a Windows workstation and uploading files to your web host's server. At at minimum, you must edit the sites/default/settings.php and set the following variables:

$db_url - Contains your MySQL database connection info
$base_url - Set this to point to your web site (http://mysite.com/drupal, or http://localhost/drupal if you're working on your local system)

NOTE: $base_url should not end with a trailing slash '/'

For detailed installation instructions, refer to Drupal docs at http://drupal.org/handbook.

Directory permissions depend on what you want to do with Drupal. If you are using the "images" module, the images directory needs to be writable. Otherwise, the default permissions should be just fine.

Database info:

  • The Drupal DB can be shared with other applications.
  • Drupal only supports MySQL and PostgreSQL at this time.
  • MySQL is preferred because the module support is better than PostgreSQL.
  • To create your database, run databases/database.mysql script (in the Drupal source).

User accounts:

  • The first person that requests a login, gets uid == 1 (superuser). It is recommened that you login as soon as you install Drupal and create an "admin" user, then create your own non-superuser account.
  • Drupal lets you create roles and grant permissions based on those roles.
  • You can choose whether to require approval of new users or let them be self-approved (when new accounts are created).
  • When a user creates their own account, Drupal emails them their password. If the administrator creates a user, no email is sent.

Modules:

  • Each module can create its own permissions; when you install a new module, you need to update the permissions page.
  • You assign permissions to modules based on roles.
  • Installation of a new modules is simple: install the module file, run an update database script if the module requires one.
  • Every module has a forum and issue (bug tracking) system. While there is no auditing of the module code, there are a limited number of CVS committers.
  • Additional modules can be downloaded from http://drupal.org.
  • It was recommened that one "just say No" to street modules (non-drupal sanctioned code).
  • The image module is growing in popularity and recommended over PHP gallery.

Benefits of Drupal over Mambo:

  • Drupal is built on a solid architecture with a well designed API.
  • Drupal has a steep initial learning curve, but is very powerful once you learn how it works.
  • Drupal has a much better permissions model.
  • Drupal allows in place editing of web pages. If a user has sufficient permissions for a given page, they will see an Edit tab they can click on to update that piece of content. There's no need for the user to login to an "admin" area in order to edit content.
  • The DB abstraction layer on Drupal is written in a way that prevents SQL injection making Drupal more secure. For more info about Drupal security, see Drupal security versus other Content Management Systems link on the tcphp.org site.
  • The core Drupal code handles error checking and validates form input.
  • Drupal has powerful caching that other CMS's lack.
  • Drupal has modules that can determine if you're doing a SELECT or UPDATE database query and allows you to send the query to a different DB server (if you're doing MySQL replication). This allows for a SELECT only instance of a database for say, reporting.

Themes:

  • Drupal comes with a handful of themes.
  • Additional themes are available from the Drupal main site http://drupal.org/project/Themes and the Drupal Theme Garden at http://themes.drupal.org/
  • Drupal gives you the option of allowing individual users to select their own theme for a site or not.
  • It is pretty easy to create/modify themes, just copy an existing theme and start hacking the .css file.
  • Each theme has a global style sheet and each directory can have its own that overrides the global one.
  • Themes are set up using variables, which makes it easier for designers to work with. See examples of variables in page.tpl.php included in the Drupal source.

HTML editor:
The HTML editor is configurable in Drupal. A couple of options are:

HTMLArea - Allows you to configure what buttons are available to the user (eg, bold, italic, etc...)

FCKeditor - it is either really basic, no html source at all; OR, the default is just a ton of buttons and stuff that overwhelmes the user

Terminology:
Drupal content is contained in nodes.

  • A node is "a thing" - an event, a link, a story, a page, and so on.
  • A taxonomy is just a category.
  • A block is just a "chunk" of content.

Nodes are nice because you can assign categories to them and search based on the category (similar to how a library system works -- you can search for a book based on author, title, subject, catalog number, etc...)

Flexinode, and its successor CCK (Content Construction Kit) were briefly mentioned.

Drupal allows you to create "profiles" and add other fields to users and then classify and group users by those fields.

Currently, blocks support 1, 2, or 3 columns of output, but the Drupal team is working on allowing placement of blocks anywhere you can via css.

Drupal and Search Engines:

  • Drupal is good from a SEO (Search Engine Optimization) point of view because it creates lots of pages. More pages translate into potentially more hits to your web site and thus higher page ranking.
  • Search engines see a "good" page. Drupal produces very clean HTML and adds search words.
  • Drupal lets you manage URLs; eg, meeting/notes/may-2005 instead of ?q=123
  • path_auto turns a page title into the URL; see also path_alias.


Upgrades:
Before upgrading to a newer release of Drupal, check the modules tab on drupal.org to make sure all the modules you're using have caught up with the new release. If they have, your upgrade should be smooth.

The API can change at any time with the next major release. If you write your own modules or use "street modules" your stuff may break. Keep in mind you are not forced to upgrade as every new release comes out.

Drupal 4.6 requires PHP 4.3.3 or later; all but search function should work with older PHP versions if you are unable to update your PHP.

Some Example Drupal sites:
http://tcphp.org
http://willowshospital.org
evolt.org is moving to Drupal
Terminus1525.ca
More Drupal sites are listed at http://drupal.org/drupal-sites


Did you find these notes helpful? Please consider attending a meeting, taking notes, and posting them to the TCPHP web site to keep the group growing.

AttachmentSize
may-2005-notes.pdf30.99 KB
InstallDrupal.sxi215.73 KB