Documentation for the Documentator station at ProtoSpace (Fablab Utrecht, NL)
We're using Drupal, so this writeup is about all the nuts and bolts of Drupal 6 configuration needed to pull off the idea. (other platforms for providing something similar might be developed in the future, depending on need/demand. (you can let me know about need / demand, just email anu at fabfolk dot com)
Warning: Checkin log module is alpha at best, presently. Discovered showstopper bug (doesn't appear in our production environment): the block displays regardless of theme settings (at least Garland theme).
There are a number of things I would do differently if I started from scratch - but the process of learning was worth the effort in any case.
- Context module could be used instead of relying on session variables for keeping track of system states.
- Content profile is a bit of tricky to configure - hiding title and body fields requires yet another module to be installed, and keeping the personal information of user profiles is less intuitive to hide than with Drupal core profile module.
- It might be better to contain the various node template, form manipulation and theming tweaks in a custom module.
(1) User logs in with their ProtoSpace website user account. At account creation, we record and keep the non-changing demographic data as part of the user profile (only to be shown to lab adminstrative personnel)
(2) User can start a new project, or continue one of their existing projects.
At this stage, we only ask the user to fill in a few details on the project they intend to be working on at the lab: project name, short description and machines intended to use.
User action is logged for the lab administrative personnel – who who did what, when and with which machines.
(3) Check in is all done, some welcoming text is shown to user who may now enter the lab and start working on their project. The check in station automatically logs the user out and redirects back to the login screen for the next visitor walking in.
(1) User logs in.
(2) User can choose which one of their projects they completed that day.
(3) User completes more detailed description of their project: including picture, design source file and a full description of their project – a FabMoment.
(4) Check out is done – the FabMoment is published and shown on the user profile page as well as ProtoSpace FabMoments page (and beyond…)
Documentator automatically logs the user out and redirects back to the login screen.
Various bits and pieces
- templatetweaks.txt - some layout processing goes on in the theme, append the contents to sites/all/themes/YOURTHEME/template.php
- css.txt -> append to sites/all/themes/YOURTHEME/style.css
- view_fabmoments_checkin.txt -> import in admin/build/views
- view_fabmoments_checkin.txt -> import in admin/build/views
- content_profile.txt -> import in admin/content/types/import
- content_fm.txt -> import in admin/content/types/import
- checkinout_pages.txt -> import in admin/content/import
- rules.txt -> import in admin/rules/ie/import
==> unzip Imports.zip
A number of Drupal contributed modules were used to produce different parts of the functionality required by the "kiosk" stands A custom module for logging user actions (launched by conditions set by the Rules module) was created. Complete list of modules used (the number may seem large, but many of them are commonly used in any regular Drupal installation)
- PHP filter - needed for some of the processing in the checkin/checkout pages
- Path - needed for setting paths for the checkin & checkout pages
- Workflow - for catching system events that can launch actions (such as publishing a FabMoment or logging lab visit)
- Rules - for managing the documentation (FabMoment) states - things should not be published
- Rules Admin UI
- Content Copy
- Text field
- Option Widgets
- Content Profile
- Content Profile User Registration
- Node export - for importing checkin / checkout page content)
- Token - for replacing tokens in redirection paths
- CAPTCHA - latest
- Views UI
- checkin_log - provides actions that can be launched via rules for logging user activity and display logs in a block
- At /admin/rules/ie/import import rules.txt (found in imports.zip package)
- Unfortunately workflows are not exportable, so creating a workflow through the admin interface is needed
- Add workflow: admin/build/workflow/add
- Add state 1: admin/build/workflow/state/2
checkin - FabMoment draft started
- Add state 2: admin/build/workflow/state/2
checkin - Fabmoment being edited today
- Add state 3: admin/build/workflow/state/2
- Set "fm" content type to have FabMoment editing workflow
- go to workflow editing (on top of the page) to add permissions for users to transfer content between states - admin/build/workflow/edit/2
(creation) → checkin - FabMoment draft started checkin - Fabmoment being edited today → checkin - FabMoment draft started checkin - FabMoment draft started → checkin - Fabmoment being edited today checkin - FabMoment draft started → Gepubliceerd Gepubliceerd → checkin - Fabmoment being edited today Gepubliceerd → checkin - FabMoment draft started
Checkin & checkout pages
- at admin/content/import, import pages.txt (import.zip) (Node Export needs to be enabled for imports and PHP filter for being able to save these pages that contain a little bit of PHP properly)
- text is in Dutch, translations upon request (anu at fabfolk dot com)
- Reset the paths (Path module needs to be enabled)
- (node title) Inchecken -> (path) checkin
- Wat ga je vandaag maken? -> checkin2
- Welkom -> checkin3
- Uitchecken -> checkout
- Mijn recente FabMoments -> checkout2
- Bedankt! -> checkout3
Content profile module enables user profile to be created as nodes. This was during prototyping as I thought viewing user activity would have been possible by constructing a view showing node revisions combined with user information - turns out it was not possible (in a re-do, I'd probably go for just using the user profile)
- at admin/content/import import content_profile.txt (found in package imports.zip)
- Permissions: at (user permissions table) set (anon&auth users can create content profile)
- The import should have taken care of this content type acting as user profile
- at admin/content/node-type/profile
- Checked: Use this content type as a content profile for users
- Checked: Use on Registration
- Hide form fields: Title
- some additional steps might be needed to hide Title & Body fields from users, more information here
- at admin/content/import import content_fm.txt (found in package imports.zip)
- edit the permissions to enable regular logged-in users to create, view, edit, delete the fm type nodes (only their own)
- Views - we're using Views 3 alpha due to some past site management choices, Views 2 should work just as well. For importing my views however you need Views 3 alpha.
Add views at admin/build/views/ admin/content/node-type/profile
- Machine readable name for the block: checkout_fabmoments
- Machine readable name for the block: checkin_fabmoments
- Add the view blocks to be displayed on checkin and checkout pages at admin/build/block/list
- Show Checkin & Checkout block on content area
- Only show them on specific pages
- checkin block -> checkin2
- checkout block -> checkout2
- Template files are in theme.zip
- Copy page templates to your theme folder (e.g. sites/all/themes/my_fablab/)
page-checkin2.tpl.php page-fabmoments.php page-checkin3.tpl.php page-fm.tpl.php page-checkin.tpl.php page-node-add-fm.tpl.php page-checkout2.tpl.php page-node-add-profile.tpl.php page-checkout3.tpl.php page-user-profile-profile.tpl.php page-checkout.tpl.php page-user-register.tpl.php
- create user accounts without admin approval
- for this, a must unless you want a thousand spammer accounts created: Configure CAPTCHA (or any variation of it) to be used for user registration
- at admin/user/settings make sure that:
- Visitors can create accounts and no administrator approval is required. is selected
- Require e-mail verification when a visitor creates an account is unchecked