KWLUG Web Site Construction

This document describes how the Drupal 6 version of the KWLUG web site was built so that future generations of volunteers can use it as a guide to how the site was built and what's important. Hopefully administrators will keep this up to date as changes are made.

Drupal, Modules and Themes

As you likely have guessed, Drupal forms the core of the web site. In this incarnation it's Drupal 6.

Here are links to the various packages

Core

Modules

-

Theme

Node Structure

One of the powerful features of Drupal (and other CMSs) is the categorization, organisation and presentation of information. The KWLUG site contains a modest structure of content types and relations. This structure of information is often the first thing that has to be learned when understanding how a web site works.

Meeting Agenda

Meeting Agendas are a focal point of the web site and one of the more complicated structures on the site.

Meeting Agendas are comprised of a date, a Location (via node reference) and zero or more Presentation Topics (via node relativity.)

Content type: meetingagenda
Node references: location (node)
emcee (user)
Taxonomy none
Related content types: presentation
Views:
upcomingmeetings
[page] displays today's and future meetings
meetingarchive
[page] displays meetings prior from today

Presentation Topics

Presentation Topics describe what the presentation is about. The presenter is listed textually in the body of the node and subsequent to the presentation the presenter is encouraged to add his slides to the node by attaching a file.

Content type: presentation
Node references: none
Taxonomy none
Related content types: none
Views: none

Location

Locations are places where meetings are held. Although meetings generally occur in one location for long stretches of time, they have changed venues. Locations describe the venue and how to get there.

Content type: location
Node references: none
Taxonomy none
Related content types: none
Views:
kwluglocations
[page] displays a list of all locations

FLOSS Fund Nominations

One of the recurring efforts at the KWLUG is an organized donation to a free software project. Projects can be nominated by anyone and, if successfully chosen, the project is announced at a meeting and donations are taken.

Content type: nominee
Node references: Meeting Agenda
Taxonomy none
Related content types: none
Views:
ffnominees
[page, block] displays a list of all nominees that do not have contributions
contributions
[page, block] display a list of all nominees that have contributions

Learning Resources

Learning resources are not a specific content type but rather a classification of pages. Learning resources can be a page, book, blog or story. By tagging the node with one of the taxonomy terms it automatically appears in the selected views and RSS feeds.

Content types: blog, book, page, story
Node references: none
Taxonomy Learning
Related content types: none
Views:
Learning
[page, block, rss] displays a list of all nodes tagged with a Learning taxonomy term

All Content

All content is visible via a view called tracker. Which show handy blocks and provides RSS feeds to subscribers.

Content type: all
Node references: n/a
Taxonomy n/a
Related content types: n/a
Views:
tracker
[page, block, rss] displays a list of all content sorted by descending update time

Authorization

There are several levels or roles of users in the web site. Two are default Drupal user roles (anonymous and authenticated) and the others are custom roles created for this site.

User 1

User 1 is not a role, but rather the user with the ID of 1. It is the first user created in Drupal and has ultimate power and can do things that no other user can do. Usually the first thing User 1 does is to create a user role for administrators and grants them permission to do whatever is needed. This usually includes the ability to modify user roles and permissions.

Role Inheritance

There is kind of an inheritance with roles in that a user can simultaneously be anonymous, authenticated and be zero or more other roles at the same time.

This means that if a permission is applied to the anonymous role it need not be applied to any other because all users and non-users are anonymous. And any permission applied to the authenticated role need not be applied to any other role because any authenticated user falls into that role.

Administrator

The administator is not a special user role (like User 1) but one created for this site so that many people can administer this site.

Administrators can perform any task on the site because then have the ability to change role permissions and can grant any permission to their role.

Administrators are meant to be the technical people who understand how the Drupal site works and can perform administrative tasks.

Cabal

The cabal role is reserved for those special shadowy users who administer the FLOSS fund. They should have the ability to edit and delete any nominee node.

Host

A host is an emcee or a person that takes care of meeting agendas. The host can create meeting agendas and presentations.

Librarian

A librarian is a user who administers the library or books and DVDs. Currently there are no permissions assigned to librarians.

Member

A member is a generic user that has been approved. The member can create blog posts, forums posts and post other content.

Speaker

A speaker is one who delivers a presentation. The speaker can create and edit any presentation content.

Drupal 5 to 6 Conversion

Upgrading from Drupal 5 to 6 is a complicated task which is surprising given the relative simplicity of the web site.

Early Preparation

The existing site needs to be upgraded to the latest version of Drupal 5 and each of the modules and themes should be updated to the latest drupal 5 versions.

Having the site up to the latest Drupal 5 versions means that database upgrade scripts of Drupal and the modules will work. Some modules drop upgrade support for old versions.

A test conversion was done on another web server so that time could be spent to find issues and perform conversions as necessary. Any changes to the database were recorded because they would have to be replicated during the live cut-over.

Any changes that could be made to content ahead of time (like inappropriate references to http://drupal.kwlug.org) were removed. These changes will be carried over with the database.

Any changes to file-system files were recorded. Those files will have to be moved to the live web host during cut-over.

Cut Over

Cut over involves significant command line work unpacking Drupal and modules, creating new folders and copying new files. It also involves a fair amount of web interface work to convert configurations and repair what look like conversion problems.

At the time of cut-over the site needs to be put in maintenance mode. A backup of the web files should be taken along with a backup of the database. The upgrade will make significant changes to both and backups are the only way to return back to normal if something goes awry.

Modules should be disabled and a stock theme (like Garland) should be chosen as the default theme.

Files are moved aside (except for /files and /sites) and the new drupal files put in place. Modules should be placed in /sites/all/modules, the zen theme should be put in /sites/all/themes and the custom kwlug theme put in /sites/kwlug.org/themes. Don't forget the .htaccess file.

Once the files are unpacked in place the /drupal-6.??/sites/default/default.settings.php file should be copied to /sites/kwlug.org/settings.php and it should be updated to set the $db_url to an appropriate value and the $update_free_access to TRUE.

Then run the /upgrade.php script. This will upgrade the database files for the installed modules. Views will complain that some tables do not exist but it will succeed. This script may require running twice.

Change the settings.php script and set $uprgade_free_access back to FALSE.

Browse to /admin and enable the following modules:

Views Conversion

The version of views changes from 1 to 2 and with that the views must be converted. The conversion isn't perfect and several fix-ups need to be done. Also identical RSS views can be merged with the page or block view.

To convert go to /admin/build/views/tools/convert and convert the views one-at-a-time. Watch for these issues:

Menu Change

The disabled "Home" menu item in Primary links interferes with the Meetings menu. Delete the Home menu item.
Add a "Get Help" menu option after Resources, link it to the URL gethelp.

Path Changed

Add "gethelp" as a path to node/745.

CAPTCHA Configuration

In /admin/user/captcha:

Image CAPTCHA

Set

Link Operations

in http://d6.kwlug.org/admin/settings/relativity/display set Parent weight to 1, Children to 2 and Link operations to 12.

File System Configuration

in admin/settings/file-system change "File system path" to sites/kwlug.org/files

Create the sites/kwlug.org/files directory and give it suitable permissions.

Content Changes

Add "Welcome" as a title to /admin/build/block/configure/block/1
Add HTML Intro "<h2>Upcoming Meetings</h2>" to upcomingmeetings view.